-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
-
The readconcern package unnecessarily uses the "functional options" pattern which is not used on any other public API. We should remove the functional options pattern and just export all fields in the ReadConcern struct so users can set them directly.
Also, some exported values or functions do not need to be exported:
- ReadConcern.MarshalBSONValue - There is no known use case for this outside of the Go driver.
Definition of done:
- Export all fields in the ReadConcern struct.
- Deprecate the ReadConcern.GetLevel getter.
- Deprecate Option type and all Option functions.
- Deprecate WriteConcern.MarshalBSONValue
Note that all deprecated code will be removed or unexported in Go Driver 2.0.
- is depended on by
-
GODRIVER-2696 Use an options pattern that doesn't require merging structs
- Closed
- is related to
-
GODRIVER-964 make option type construction consistent with the options package (e.g. readpref, readconcern, writeconcern)
- Closed