1
0
mirror of https://github.com/golang/go synced 2024-11-15 09:01:06 -07:00

cmd/go/internal/modload: close modules.txt

Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
guoguangwu 2024-04-01 09:34:31 +08:00
parent d49a14c609
commit 1e8dcfd651

View File

@ -1465,6 +1465,7 @@ func modulesTextIsForWorkspace(vendorDir string) (bool, error) {
if err != nil { if err != nil {
return false, err return false, err
} }
defer f.Close()
var buf [512]byte var buf [512]byte
n, err := f.Read(buf[:]) n, err := f.Read(buf[:])
if err != nil && err != io.EOF { if err != nil && err != io.EOF {