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-1736 Fix deprecation notice formats #503

Merged

Conversation

divjotarora
Copy link
Contributor

@divjotarora divjotarora commented Sep 16, 2020

I found these deprecations via git grep "deprecated". After fixing the notices, I ran the staticcheck linter against https://play.golang.org/p/3jPWZqPMt0H and ensured that all of the usages are marked as deprecated.

If anyone wants to reproduce the results, run go get honnef.co/go/tools/cmd/staticcheck to install the linter and copy/paste the the code from the playground link into a local script.

I couldn't test deprecation warnings for struct fields due to dominikh/go-tools#607. This means that the AuthenticateToAnything and Deployment Client options can't be tested because they don't have corresponding setter functions. To work around this for FindOptions, FindOneOptions, and IndexOptions, I deprecated both the struct field and the setter function.

@divjotarora divjotarora force-pushed the godriver1736-deprecation-notices branch from 88c5326 to 5dc0d79 Compare September 16, 2020 18:13
mongo/options/findoptions.go Show resolved Hide resolved
mongo/index_options_builder.go Outdated Show resolved Hide resolved
mongo/cursor.go Outdated Show resolved Hide resolved
mongo/cursor.go Outdated Show resolved Hide resolved
Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

LGTM pending a tweak to the note about which server version snapshot was deprecated.

mongo/options/findoptions.go Outdated Show resolved Hide resolved
mongo/options/findoptions.go Outdated Show resolved Hide resolved
Copy link
Contributor

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

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

Latest commit LGTM

@divjotarora divjotarora merged commit ce6e7c7 into mongodb:master Sep 22, 2020
@divjotarora divjotarora deleted the godriver1736-deprecation-notices branch September 22, 2020 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants