-
Notifications
You must be signed in to change notification settings - Fork 912
Remove oppressive language from source code and documentation #717
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
Remove oppressive language from source code and documentation #717
Conversation
mongo/integration/database_test.go
Outdated
}) | ||
mt.Run("decode struct", func(mt *mtest.T) { | ||
result := struct { | ||
IsMaster bool `bson:"ismaster"` | ||
Ok float64 `bson:"ok"` | ||
Hello bool `bson:"ismaster"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you have any clever ways of obfuscating or removing this ismaster
struct tag. Wasn't sure how to do it without altering the underlying test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the intent of this test is to check that the mongo.SingleResult
returned by RunCommand
can be decoded into a struct. I do not think it is necessary to use the ismaster
command to test this.
hello
was backported to 3.6, but the Go driver tests back to 2.6.
Could we use the ping
command? And change the result struct to contain only the Ok
field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea; switched to ping
and removed the Hello
field entirely.
var LegacyHelloLowercase = "ismaster" | ||
|
||
// LegacyNotPrimary is the legacy version of the "not primary" server error message. | ||
var LegacyNotPrimary = "not master" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you think there's a better place for these constants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a sensible place to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
--
For the GitHub link in mongotest.go:
https://github.com/mongodb/specifications/tree/master/source/transactions/tests#server-fail-point
Can be replaced with the Git hash commit (press 'y' in GitHub to get the HEAD commit)
Or alternatively, this could use HEAD
https://github.com/mongodb/specifications/tree/HEAD/source/transactions/tests#server-fail-point
var LegacyHelloLowercase = "ismaster" | ||
|
||
// LegacyNotPrimary is the legacy version of the "not primary" server error message. | ||
var LegacyNotPrimary = "not master" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a sensible place to me.
mongo/integration/database_test.go
Outdated
}) | ||
mt.Run("decode struct", func(mt *mtest.T) { | ||
result := struct { | ||
IsMaster bool `bson:"ismaster"` | ||
Ok float64 `bson:"ok"` | ||
Hello bool `bson:"ismaster"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the intent of this test is to check that the mongo.SingleResult
returned by RunCommand
can be decoded into a struct. I do not think it is necessary to use the ismaster
command to test this.
hello
was backported to 3.6, but the Go driver tests back to 2.6.
Could we use the ping
command? And change the result struct to contain only the Ok
field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…b#717) GODRIVER-2007 GODRIVER-2008
GODRIVER-2007
GODRIVER-2008
Removes most occurrences of oppressive language from source code, documentation, and tests.
Feel free to download GNU grep with
brew install grep
and useggrep -PriI '(docs\.mongodb\.com\/master\|(?<!/)master(?!.?key)\|slave\|whitelist\|blacklist)'
to check for any missed occurrences.