source: code/trunk/vendor/github.com/valyala/fasthttp/nocopy.go@ 145

Last change on this file since 145 was 145, checked in by Izuru Yakumo, 22 months ago

Updated the Makefile and vendored depedencies

Signed-off-by: Izuru Yakumo <yakumo.izuru@…>

File size: 394 bytes
RevLine 
[145]1package fasthttp
2
3// Embed this type into a struct, which mustn't be copied,
4// so `go vet` gives a warning if this struct is copied.
5//
6// See https://github.com/golang/go/issues/8005#issuecomment-190753527 for details.
7// and also: https://stackoverflow.com/questions/52494458/nocopy-minimal-example
8type noCopy struct{} //nolint:unused
9
10func (*noCopy) Lock() {}
11func (*noCopy) Unlock() {}
Note: See TracBrowser for help on using the repository browser.