github.com/primecitizens/pcz/std@v0.2.1/core/mark/nocopy.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package mark 5 6 // NoCopy may be added to structs which must not be copied 7 // after the first use. 8 // 9 // See https://golang.org/issues/8005#issuecomment-190753527 10 // for details. 11 // 12 // Note that it must not be embedded, due to the Lock and Unlock methods. 13 type NoCopy struct{} 14 15 // Lock is a no-op used by -copylocks checker from `go vet`. 16 func (*NoCopy) Lock() {} 17 func (*NoCopy) Unlock() {}