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

feat(spanner): export ToSpannerError #3133

Merged
merged 3 commits into from Nov 4, 2020
Merged

Conversation

olavloite
Copy link
Contributor

The ToSpannerError method should be exported to allow users to create Spanner errors to use with unit tests. Currently, that was only possible by creating a struct directly and filling the deprecated Code field. That is however no longer recommended, as the Code field might be removed in a future release.

Fixes #3122

The ToSpannerError method should be exported to allow users to create
Spanner errors to use with unit tests. Currently, that was only possible
by creating a struct directly and filling the deprecated Code field. That
is however no longer recommended, as the code field might be removed in a
future release.

Fixes #3122
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 3, 2020
@codyoss codyoss changed the title feat: export ToSpannerError feat(spanner): export ToSpannerError Nov 3, 2020
spanner/errors.go Outdated Show resolved Hide resolved
Copy link
Contributor

@hengfengli hengfengli left a comment

Choose a reason for hiding this comment

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

LGTM.

@product-auto-label product-auto-label bot added the api: spanner Issues related to the Spanner API. label Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spanner: new method for declaring spanner.Error
2 participants