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

chore: fix some comments and typos #1623

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion etc/compile_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function version {
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';
}

# compile_check will attempt to build the the internal/test/compilecheck project
# compile_check will attempt to build the internal/test/compilecheck project
# using the provided Go version. This is to simulate an end-to-end use case.
# This check will only run on environments where the Go version is greater than
# or equal to the given version.
Expand Down
2 changes: 1 addition & 1 deletion mongo/options/mongooptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const (
// UpdateLookup includes a delta describing the changes to the document and a copy of the entire document that
// was changed.
UpdateLookup FullDocument = "updateLookup"
// WhenAvailable includes a post-image of the the modified document for replace and update change events
// WhenAvailable includes a post-image of the modified document for replace and update change events
// if the post-image for this event is available.
WhenAvailable FullDocument = "whenAvailable"
)
Expand Down
2 changes: 1 addition & 1 deletion mongo/writeconcern/writeconcern.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var ErrNegativeWTimeout = errors.New("write concern `wtimeout` field cannot be n
type WriteConcern struct {
// W requests acknowledgment that the write operation has propagated to a
// specified number of mongod instances or to mongod instances with
// specified tags. It sets the the "w" option in a MongoDB write concern.
// specified tags. It sets the "w" option in a MongoDB write concern.
//
// W values must be a string or an int.
//
Expand Down
2 changes: 1 addition & 1 deletion x/mongo/driver/auth/speculative_x509_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func createSpeculativeX509Handshake() []bsoncore.Document {
return []bsoncore.Document{hello}
}

// createSpeculativeX509Handshake creates the server replies for a handshake + X509 authentication attempt.
// createRegularX509Handshake creates the server replies for a handshake + X509 authentication attempt.
// There are two replies:
//
// 1. hello reply
Expand Down
2 changes: 1 addition & 1 deletion x/mongo/driver/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ func (op Operation) Execute(ctx context.Context) error {
}
}()
for {
// If we're starting a retry and the the error from the previous try was
// If we're starting a retry and the error from the previous try was
// a context canceled or deadline exceeded error, stop retrying and
// return that error.
if errors.Is(prevErr, context.Canceled) || errors.Is(prevErr, context.DeadlineExceeded) {
Expand Down
2 changes: 1 addition & 1 deletion x/mongo/driver/operation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestOperation(t *testing.T) {
_, err := op.selectServer(context.Background(), 1, nil)
noerr(t, err)

// Assert the the selector is an operation selector wrapper.
// Assert the selector is an operation selector wrapper.
oss, ok := d.params.selector.(*opServerSelector)
require.True(t, ok)

Expand Down
2 changes: 1 addition & 1 deletion x/mongo/driver/topology/polling_srv_records_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ func TestPollingSRVRecordsLoadBalanced(t *testing.T) {

func TestPollSRVRecordsMaxHosts(t *testing.T) {
// simulateSRVPoll creates a topology with srvMaxHosts, mocks the DNS changes described by
// recordsToAdd and recordsToRemove, and returns the the topology.
// recordsToAdd and recordsToRemove, and returns the topology.
simulateSRVPoll := func(srvMaxHosts int, recordsToAdd []*net.SRV, recordsToRemove []*net.SRV) (*Topology, func(ctx context.Context) error) {
t.Helper()

Expand Down
2 changes: 1 addition & 1 deletion x/mongo/driver/wiremessage/wiremessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ func ReadReplyCursorID(src []byte) (cursorID int64, rem []byte, ok bool) {
return readi64(src)
}

// ReadReplyStartingFrom reads the starting from from src.
// ReadReplyStartingFrom reads the starting from src.
func ReadReplyStartingFrom(src []byte) (startingFrom int32, rem []byte, ok bool) {
return readi32(src)
}
Expand Down