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

Replace all bit-shifting with encoding/binary calls

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.16.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Go Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Context

      The byte-to-integer conversion logic in the wiremessage and bsoncore packages is difficult to understand and maintain. It's also missing unit tests. Use the encoding/binary package instead, which has well-tested code and an API that documents the format(s) being used.

      Definition of done

      • Replace all manual byte-to-integer conversion logic in the wiremessage package with calls to encoding/binary functions.
      • Replace all manual byte-to-integer conversion logic in the bsoncore package with calls to encoding/binary functions.
      • Add unit tests for the wiremessage package.

      Pitfalls

            Assignee:
            qingyang.hu@mongodb.com Qingyang Hu
            Reporter:
            matt.dale@mongodb.com Matt Dale
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: