Closed
Description
The cmd/vet context check and the context package/methods were all added in 1.7. There are numerous complaints from vet about the stdlib. For most of them, we should probably either fix the stdlib or the vet check before release. This issue is to investigate them.
context/withtimeout_test.go:16: the cancel function returned by context.WithTimeout should be called, not discarded, to avoid a context leak
net/http/h2_bundle.go:2000: the cancel function is not used on all paths (possible context leak)
net/http/h2_bundle.go:2005: this return statement may be reached without using the cancel var defined on line 2000
net/http/server.go:778: the cancelCtx function is not used on all paths (possible context leak)
net/http/server.go:787: this return statement may be reached without using the cancelCtx var defined on line 778