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

Nil interface panics in BSON marshalling

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 1.2.0
    • None
    • None
    • None

    Description

      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

      Attachments

        1. main.go
          0.4 kB

        Activity

          People

            isabella.siu@mongodb.com Isabella Siu (Inactive)
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: