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

go vet error #180

Open
SamPeng87 opened this issue Dec 1, 2022 · 0 comments
Open

go vet error #180

SamPeng87 opened this issue Dec 1, 2022 · 0 comments

Comments

@SamPeng87
Copy link

我尝试做一些功能开发。本地测试发现go vet 会报错,虽然我的本地版本是go 1.9.但我认为这个报错应该解决。但我不知道从哪里下手。

pkg/notify/notifier/token.go:46:12: assignment copies lock value to t: (github.com/kubesphere/notification-manager/pkg/notify/notifier.token, bool) contains github.com/kubesphere/notification-manager/pkg/notify/notifier.token contains sync.Mutex

我看见token里面确实有mutex对象。这个对象在赋值的时候会对mutex进行拷贝。这段代码在2020年开发的,当时的版本应该go vet没检查到。现在最新的可能已经检查到这个bug了。

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

No branches or pull requests

1 participant