mirror of
https://github.com/golang/go
synced 2024-11-05 17:26:11 -07:00
866b24e166
Using a type containing a sync type directly in a function call (whether as a receiver, a param, or a return value) is an easy way to accidentally copy a lock or other sync primitive. Check for it. The test as implemented does not provide 100% coverage; see the discussion near the bottom of testdata/copylock.go for shortcomings. Fixes golang/go#6729. R=adg, r, dsymonds CC=golang-dev https://golang.org/cl/23420043 |
||
---|---|---|
.. | ||
asm1.s | ||
asm2.s | ||
asm3.s | ||
asm4.s | ||
asm.go | ||
assign.go | ||
atomic.go | ||
buildtag_bad.go | ||
buildtag.go | ||
composite.go | ||
copylock.go | ||
deadcode.go | ||
method.go | ||
nilfunc.go | ||
print.go | ||
rangeloop.go | ||
shadow.go | ||
structtag.go |