Nil interface panics in BSON marshalling

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 1.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Repro attached. We can probably check if the value is nil and the reflect.Kind is an interface. In this case, either marshal to BSON null or leave out the field if omitempty is given in a struct.

      main.go

        1. main.go
          0.4 kB

            Assignee:
            Isabella Siu (Inactive)
            Reporter:
            Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: