- 
    Type:Task 
- 
    Resolution: Done
- 
    Priority:Major - P3 
- 
    Affects Version/s: None
- 
    Component/s: None
- 
    None
- 
        None
- 
        Go Drivers
- 
        Not Needed
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
Background: We received the following feedback from Dennis Kuczynski on the Cloud Automation team:
Consider options.{type}Builder.Build() or Merge() for easy access to underlying options
- At least in mms-automation there are multiple ways the options are used for validation, testing, logging, and setting defaults.
- https://github.com/10gen/mms-automation/blob/master/go_planner/src/com.tengen/cm/dbcheck/dbcheckcommon/mongo_test.go#L53
Slack discussion:
Go Driver team discussion:
- PV: Just need to export this function: https://github.com/mongodb/mongo-go-driver/blob/master/mongo/options/lister.go#L15
- PV: Best solution might be reverting options pattern specifically for ClientOptions, deferring to the original v1 pattern.
- This particular issue has been coming up a lot. We originally decided to change this since maintenance was expensive.
- Try to build a test that uses reflection to tell us we made a bug when merging structs.
Bottom line: We need to figure out what to do with this pattern and testing out whether we can use a test to prevent bugs (scope is ClientOptions not other options).
- is duplicated by
- 
                    GODRIVER-3315 Describe ways to ease ClientOption usages for v2 migrations -         
- Closed
 
-