notification-manager
notification-manager copied to clipboard
go vet error
我尝试做一些功能开发。本地测试发现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了。