Context
The description of the behavior of the omitempty struct tag when handling structs can be misleading. Additionally v1.14.0 removed the language that describes the interaction between the omitempty struct tag and struct fields, which should be re-added for additional clarification.
See this forum post for more context.
Definition of done
- Add a note to the description of the BSON omitempty struct tag that describes how struct fields are treated, specifically the use of bsoncodec.Zeroer. Note that struct values and struct pointer values both check bsoncodec.Zeroer to determine "emptiness".
Pitfalls
- related to
-
GODRIVER-3427 Add a global "omitempty" flag
- Backlog