You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
msg="No version of Go installed and no `go.mod` file found. Writing an "+
728
+
"`environment.json` file specifying the maximum supported version of Go ("+
729
+
maxGoVersion+")."
730
+
version=maxGoVersion
731
+
}
716
732
717
-
ifoutsideSupportedRange(goModVersion) {
718
-
log.Println("The version of Go specified in the go.mod file ("+goModVersion+") is outside of the supported range ("+minGoVersion+"-"+maxGoVersion+").")
719
-
//TODO: emit diagnostic
720
-
return""
733
+
if!v.goInstallationFound&&v.goDirectiveFound {
734
+
msg="No version of Go installed. Writing an `environment.json` file specifying the "+
735
+
"version of Go found in the `go.mod` file ("+v.goModVersion+")."
736
+
version=v.goModVersion
721
737
}
722
738
723
-
if!isGoInstalled() {
724
-
ifgoDirectiveFound {
725
-
log.Println("No version of Go installed. Writing an `environment.json` file specifying the version of Go from the go.mod file ("+goModVersion+").")
726
-
returngoModVersion
727
-
} else {
728
-
log.Println("No version of Go installed and no `go.mod` file found. Writing an `environment.json` file specifying the maximum supported version of Go ("+maxGoVersion+").")
729
-
returnmaxGoVersion
730
-
}
739
+
ifv.goInstallationFound&&!v.goDirectiveFound {
740
+
msg="No `go.mod` file found. Version "+v.goEnvVersion+" installed in the environment."
741
+
version=""
731
742
}
732
743
733
-
envVersion:=getEnvGoVersion()[2:]
744
+
returnmsg, version
745
+
}
734
746
735
-
ifoutsideSupportedRange(envVersion) {
736
-
log.Println("The version of Go installed in the environment ("+goModVersion+") is outside of the supported range ("+minGoVersion+"-"+maxGoVersion+").")
0 commit comments