mirror of
https://github.com/golang/go
synced 2024-11-15 04:50:31 -07:00
cmd/go/internal/modload: close modules.txt
Change-Id: Ieb4cf76f4d7050d2f3052c2f90e47901de74d641
GitHub-Last-Rev: 1e8dcfd651
GitHub-Pull-Request: golang/go#66629
Reviewed-on: https://go-review.googlesource.com/c/go/+/575475
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Sam Thanawalla <samthanawalla@google.com>
This commit is contained in:
parent
5038ce82b6
commit
b6efc3b755
@ -1465,6 +1465,7 @@ func modulesTextIsForWorkspace(vendorDir string) (bool, error) {
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
defer f.Close()
|
||||
var buf [512]byte
|
||||
n, err := f.Read(buf[:])
|
||||
if err != nil && err != io.EOF {
|
||||
|
Loading…
Reference in New Issue
Block a user