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

Nil interface panics in BSON marshalling

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.2.0
    • 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
          Divjot Arora

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: