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

noCopy implements sync.Locker #1216

Merged

Conversation

shogo82148
Copy link
Contributor

Description

noCopy is used by -copylocks checker from go vet.
see golang/go#8005 (comment) for details.
but it doesn't work from Go 1.11, because of golang/go@c2eba53 and golang/go#26165
-copylock now works with structs that implement sync.Locker.
So, noCopy should implement sync.Locker.

related tweets (written in Japanese):

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

noCopy is used by -copylocks checker from `go vet`.
see golang/go#8005 (comment) for details.
but it doesn't work from Go 1.11, because of golang/go@c2eba53 and golang/go#26165
-copylock now works with structs that implement sync.Locker.
So, noCopy should implement sync.Locker.
@shogo82148 shogo82148 merged commit 4b65372 into go-sql-driver:master May 26, 2021
@shogo82148 shogo82148 deleted the no-copy-should-implement-locker branch May 26, 2021 11:46
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.

2 participants