Check value validity in isZero function

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 0.0.16
    • Affects Version/s: 0.0.15
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Kristofer Brandow (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: