aboutsummaryrefslogtreecommitdiff
path: root/nocopy.go
blob: 8e9b89a419786ef011bc10446e50bc75f1be3d4a (plain)
1
2
3
4
5
6
7
8
9
10
11
package fasthttp

// Embed this type into a struct, which mustn't be copied,
// so `go vet` gives a warning if this struct is copied.
//
// See https://github.com/golang/go/issues/8005#issuecomment-190753527 for details.
// and also: https://stackoverflow.com/questions/52494458/nocopy-minimal-example
type noCopy struct{}

func (*noCopy) Lock()   {}
func (*noCopy) Unlock() {}