isZero function should compare structs with DeepEquals

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Structs in Go can't be directly compared with simple equality if they contain slice, map, or function fields. Currently, if such a struct is passed through the BSON encoder and the isZero function is hit, a panic is triggered.

      Should instead use reflect.DeepEqual at this line: https://github.com/mongodb/mongo-go-driver/blob/master/bson/encode.go#L466

              Assignee:
              Unassigned
              Reporter:
              Thomas Delacour
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: