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

nil context should always default to context.Background

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Internal
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: