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

bson package unable to Decode Enum values

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

      I am trying to use new go driver but I found with regarding BSON decoding. I can reproduce the issue with the file in the attachment. The problem is with the defined types. Following EnumType has no problem with encoding but can't decode the original value.
       
      type EnumType int32
      const EnumType_A EnumType = 1
      type Dummy struct

      { Tt EnumType `bson:"tt"` }

        1. test_enum.go
          1 kB
          Sercan Degirmenci

            Assignee:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Reporter:
            sercand Sercan Degirmenci
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: