@@ -709,17 +709,16 @@ func loadModFile(ctx context.Context) (rs *Requirements, needCommit bool) {
709
709
// cfg.CmdName directly here.
710
710
if cfg .BuildMod == "mod" && cfg .CmdName != "mod graph" && cfg .CmdName != "mod why" {
711
711
addGoStmt (MainModules .ModFile (mainModule ), mainModule , LatestGoVersion ())
712
- if go117EnableLazyLoading {
713
- // We need to add a 'go' version to the go.mod file, but we must assume
714
- // that its existing contents match something between Go 1.11 and 1.16.
715
- // Go 1.11 through 1.16 have eager requirements, but the latest Go
716
- // version uses lazy requirements instead — so we need to cnvert the
717
- // requirements to be lazy.
718
- var err error
719
- rs , err = convertDepth (ctx , rs , lazy )
720
- if err != nil {
721
- base .Fatalf ("go: %v" , err )
722
- }
712
+
713
+ // We need to add a 'go' version to the go.mod file, but we must assume
714
+ // that its existing contents match something between Go 1.11 and 1.16.
715
+ // Go 1.11 through 1.16 have eager requirements, but the latest Go
716
+ // version uses lazy requirements instead — so we need to convert the
717
+ // requirements to be lazy.
718
+ var err error
719
+ rs , err = convertDepth (ctx , rs , lazy )
720
+ if err != nil {
721
+ base .Fatalf ("go: %v" , err )
723
722
}
724
723
} else {
725
724
rawGoVersion .Store (mainModule , modFileGoVersion (MainModules .ModFile (mainModule )))
0 commit comments