Skip to content

Commit

Permalink
fix go vet do not work on noCopy
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajunhuang authored and erikdubbelboer committed Nov 13, 2018
1 parent e771b6f commit 9d6d9b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nocopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ package fasthttp
// 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() {}

0 comments on commit 9d6d9b7

Please sign in to comment.