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

Check value validity in isZero function

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.0.16
    • Affects Version/s: 0.0.15
    • Component/s: BSON
    • None

      If the value is nil then using Interface method on it causes panic. For example, write following struct
      type State struct { Value struct { Object interface{} `bson:",omitempty"` } }
      with the following value:
      s := State{} s.Value.Object = nil
      case panic if there is not check for validity.

            Assignee:
            go-community-user Go Community User
            Reporter:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: