Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1423

Nil interface panics in BSON marshalling

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.2.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      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@mongodb.com Isabella Siu (Inactive)
            Reporter:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: