github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/vet/testdata/copylock/copylock.go (about) 1 package copylock 2 3 import "sync" 4 5 func BadFunc() { 6 var x *sync.Mutex 7 p := x 8 var y sync.Mutex 9 p = &y 10 *p = *x // ERROR "assignment copies lock value to \*p: sync.Mutex" 11 }