There were several returns in this function that could leak both the wg.Done() and <-ioLimit. This refactors them into defers close to their counterparts. Additionally I refactored the function to favor early returns over nested if statements. Fixes golang/go#32368 Change-Id: I5357d11ee526c1cb7a6bd1a0f652c61d574c10ab GitHub-Last-Rev: bfa160b9fd75c4464d2e0a2820c04ddae01de21f GitHub-Pull-Request: golang/tools#107 Reviewed-on: https://go-review.googlesource.com/c/tools/+/179878 Reviewed-by: Ian Cottrell <iancottrell@google.com> Run-TryBot: Ian Cottrell <iancottrell@google.com> |
||
---|---|---|
.. | ||
cache.go | ||
check.go | ||
external.go | ||
file.go | ||
gofile.go | ||
load.go | ||
modfile.go | ||
parse.go | ||
pkg.go | ||
session.go | ||
sumfile.go | ||
view.go | ||
watcher.go |