auth/vendor/github.com/valyala/fasthttp/nocopy.go

12 lines
378 B
Go
Raw Normal View History

2022-06-09 17:35:23 +00:00
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
2023-03-16 15:02:14 +00:00
type noCopy struct{}
2022-06-09 17:35:23 +00:00
2023-03-16 15:02:14 +00:00
func (*noCopy) Lock() {}
func (*noCopy) Unlock() {}