Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-579

nil context should always default to context.Background

    • Type: Icon: Bug Bug
    • Resolution: Won't Do
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal
    • None

      Some API functions allow a nil context, but this is inconsistently documented.

      Others, like cursor.Close do not check for a nil context.

      To assist users who don't want to explicitly specify context.Background() on all calls, all calls that take a context should check for a nil argument and replace it with context.Background().

      All such functions should also have test coverage added for this case.

            Assignee:
            benji.rewis@mongodb.com Benji Rewis (Inactive)
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: