I'm not sure, but have the feeling that the following code should not allocate an object for the field "Baz" and instead set it to nil: https://go.dev/play/p/eRTWs2Y9sDe.
- related to
-
GODRIVER-2427 Unmarshal Failing With Custom UnmarshalBSON Function and Mismatched pointer/non-pointer typing
- Closed