-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Major Change
Currently we maintain many Merge*Options functions that merge options structs together. These are used to merge possibly many options structs passed to functions that accept a variadic argument of 0 or more options structs. While that function signature has the benefit of allowing users to pass or not pass options, maintaining the Merge*Options functions adds a significant maintenance burden and has resulted in numerous bugs.
Find and implement an optional arguments pattern that doesn't require maintaining dedicated code for merging each type of option struct together when multiple options structs are provided.
Definition of done:
- Implement an optional arguments pattern that doesn't require maintaining dedicated code for merging each type of option struct together.
- Remove all Merge*Options options struct merging functions in all packages.
- depends on
-
GODRIVER-2685 Simplify "writeconcern" API
- Closed
-
GODRIVER-2686 Simplify "readconcern" API
- Closed
-
GODRIVER-2749 Deprecate all "Merge*Options" functions
- Closed
-
GODRIVER-2689 Simplify the "readpref" API
- Scheduled
- has to be done after
-
GODRIVER-2617 Remove or un-export all currently deprecated code in Go Driver 2.0
- Closed
- is depended on by
-
GODRIVER-2499 Use a nested struct for default transaction options
- Blocked
-
GODRIVER-2699 Accept exactly one "ClientOptions" in "mongo.Connect"
- Closed
- is related to
-
GODRIVER-2804 Merging ChangeStreamOptions can squash the FullDocument configuration
- Closed