Unmarshalling null into a pointer field always creates a value if the type implements bson.Unmarshaler or bson.ValueUnmarshaler

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Unknown
    • 1.9.0, 1.8.5
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

       

       

       

            Assignee:
            Matt Dale
            Reporter:
            Joël Gähwiler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: