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

Nil interface panics in BSON marshalling

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      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

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

              Dates

              Created:
              Updated:
              Resolved: