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

bson package unable to Decode Enum values

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 0.0.14
    • 0.0.6
    • BSON
    • None

    Description

      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"` }

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: