Closed mvestnik closed 3 months ago
noCopy implements sync.Locker so that go vet can trigger warnings when types embedding noCopy are copied.
It is primarily used to trigger go vet
warnings in cases where types with the '_noCopy' field are being copied.
You can find similar use cases in the Go std package: https://github.com/golang/go/blob/48b10c9af7955bcab179b60a148a633a0a75cde7/src/sync/atomic/type.go#L191
Thank you very much, I got it.
In atomic.go:
is this filler (_ noCopy) for semantics or does it actually prevent copying?