Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GODRIVER-3240 Replace all bit-shifting in wiremessage with encoding/binary calls. #1646

Merged
merged 3 commits into from
Jun 8, 2024

Conversation

matthewdale
Copy link
Collaborator

@matthewdale matthewdale commented May 25, 2024

GODRIVER-3240

Summary

  • Use functions from the "encoding/binary" package instead of custom bit-shifting logic to convert between binary and integer values in the wiremessage package.
  • Add unit tests for the modified wiremessage functions.

Background & Motivation

@mongodb-drivers-pr-bot mongodb-drivers-pr-bot bot added the priority-3-low Low Priority PR for Review label May 25, 2024
Copy link

API Change Report

No changes found!

@matthewdale matthewdale marked this pull request as ready for review June 6, 2024 02:50
@matthewdale matthewdale changed the title Replace all bit-shifting in wiremessage with encoding/binary calls. GODRIVER-3240 Replace all bit-shifting in wiremessage with encoding/binary calls. Jun 6, 2024
Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -1865,7 +1865,6 @@ func (op Operation) decodeResult(opcode wiremessage.OpCode, wm []byte) (bsoncore
return nil, errors.New("malformed wire message: insufficient bytes to read single document")
}
case wiremessage.DocumentSequence:
// TODO(GODRIVER-617): Implement document sequence returns.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment appears stale and references a GODRIVER ticket that is "Done", so I removed it.

@matthewdale matthewdale merged commit ab38b74 into mongodb:master Jun 8, 2024
19 of 27 checks passed
blink1073 pushed a commit to blink1073/mongo-go-driver that referenced this pull request Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-3-low Low Priority PR for Review
Projects
None yet
2 participants