-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Go Drivers
-
Not Needed
-
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
- is cloned by
-
GODRIVER-3260 [2.0] Replace all bit-shifting with encoding/binary calls
-
- Closed
-