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

Accept exactly one "ClientOptions" in "mongo.Connect"

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Unknown Unknown
    • 2.0.0
    • None
    • None
    • None
    • Major Change
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

    Description

      Currently mongo.Connect accepts a variadic argument for the ClientOptions value(s). However, there are no known use cases where multiple ClientOptions need to be passed in and very few where zero ClientOptions need to be passed. As a result, the options.MergeClientOptions function is almost never used, despite requiring maintenance and testing. Remove the ability to pass zero or many ClientOptions structs and remove options.MergeClientOptions.

      Definition of done:

      • Update mongo.Connect to accept a single options.ClientOptions argument instead of any number of arguments.
      • Update the mongo.Connect docs to describe default behavior when a zero-value options.ClientOptions struct is passed (existing default behavior is the same, just different syntax). Note that this may not require any changes.
      • Remove options.MergeClientOptions.

      Attachments

        Activity

          People

            Unassigned Unassigned
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: