From c5fac1edc4fbcf3fff8e8a53b8348437b86c4c59 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 8 Nov 2019 12:37:17 -0500 Subject: [PATCH] cmd/go/internal/modload: use lockedfile.Read for the initial read of the go.mod file Updates #34634 Fixes #35425 Change-Id: I878a8d229b33dcde9e7d4dfd82ddf9815d38a465 Reviewed-on: https://go-review.googlesource.com/c/go/+/206142 Run-TryBot: Bryan C. Mills Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/cmd/go/internal/modload/init.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cmd/go/internal/modload/init.go b/src/cmd/go/internal/modload/init.go index 428d7e4b304..61cbdf2c543 100644 --- a/src/cmd/go/internal/modload/init.go +++ b/src/cmd/go/internal/modload/init.go @@ -28,7 +28,6 @@ import ( "cmd/go/internal/modfetch" "cmd/go/internal/modfetch/codehost" "cmd/go/internal/mvs" - "cmd/go/internal/renameio" "cmd/go/internal/search" "golang.org/x/mod/modfile" @@ -398,7 +397,7 @@ func InitMod() { } gomod := ModFilePath() - data, err := renameio.ReadFile(gomod) + data, err := lockedfile.Read(gomod) if err != nil { base.Fatalf("go: %v", err) }