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) }