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

support Is comparison on MySQLError #1210

Merged

Conversation

chriskirkland
Copy link
Contributor

@chriskirkland chriskirkland commented May 14, 2021

Description

Adds support for comparison of MySQLError instances with errors.Is. This useful for comparing errors (either client-side or server-side) in application code, particularly for things like circuit breakers and retriers.

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary
  • Added myself / the copyright holder to the AUTHORS file

@shogo82148
Copy link
Contributor

It sounds good.
Please fix the tests with Go 1.12 by adding // +build go113.

We can drop support Go 1.12 because the latest version of Go is 1.16.
But this change may be not an enough reason to do it.

@methane
Copy link
Member

methane commented May 15, 2021

We can drop support Go 1.12 because the latest version of Go is 1.16.
But this change may be not an enough reason to do it.

I think we should drop old versions support now, because we just released v1.6.

@shogo82148 shogo82148 mentioned this pull request May 15, 2021
5 tasks
@shogo82148
Copy link
Contributor

I dropped support of Go 1.12. #1211

@chriskirkland
Copy link
Contributor Author

@methane @shogo82148 looks like the PR checks are failing because of a decrease in coverage because of newly "uncovered" lines in rows.go which this PR doesn't touch. Any suggestions how I can work around that?

errors_test.go Outdated Show resolved Hide resolved
Copy link
Member

@julienschmidt julienschmidt left a comment

Choose a reason for hiding this comment

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

Thanks!

@julienschmidt julienschmidt modified the milestones: v1.6.0, v1.7.0 Jun 3, 2021
@julienschmidt julienschmidt merged commit 417641a into go-sql-driver:master Jun 3, 2021
@chriskirkland chriskirkland deleted the feature/mysqlerror-is branch February 14, 2023 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants