@@ -741,12 +741,14 @@ func outsideSupportedRange(version string) bool {
741
741
func checkForUnsupportedVersions (v versionInfo ) (msg , version string ) {
742
742
if v .goModVersionFound && outsideSupportedRange (v .goModVersion ) {
743
743
msg = "The version of Go found in the `go.mod` file (" + v .goModVersion +
744
- ") is outside of the supported range (" + minGoVersion + "-" + maxGoVersion + ")."
744
+ ") is outside of the supported range (" + minGoVersion + "-" + maxGoVersion +
745
+ "). Writing an environment file not specifying any version of Go."
745
746
version = ""
746
747
diagnostics .EmitUnsupportedVersionGoMod (msg )
747
748
} else if v .goEnvVersionFound && outsideSupportedRange (v .goEnvVersion ) {
748
749
msg = "The version of Go installed in the environment (" + v .goEnvVersion +
749
- ") is outside of the supported range (" + minGoVersion + "-" + maxGoVersion + ")."
750
+ ") is outside of the supported range (" + minGoVersion + "-" + maxGoVersion +
751
+ "). Writing an environment file not specifying any version of Go."
750
752
version = ""
751
753
diagnostics .EmitUnsupportedVersionEnvironment (msg )
752
754
}
@@ -774,7 +776,8 @@ func checkForVersionsNotFound(v versionInfo) (msg, version string) {
774
776
}
775
777
776
778
if v .goEnvVersionFound && ! v .goModVersionFound {
777
- msg = "No `go.mod` file found. Version " + v .goEnvVersion + " installed in the environment."
779
+ msg = "No `go.mod` file found. Version " + v .goEnvVersion + " installed in the " +
780
+ "environment. Writing an environment file not specifying any version of Go."
778
781
version = ""
779
782
diagnostics .EmitNoGoMod (msg )
780
783
}
@@ -796,7 +799,8 @@ func compareVersions(v versionInfo) (msg, version string) {
796
799
diagnostics .EmitVersionGoModHigherVersionEnvironment (msg )
797
800
} else {
798
801
msg = "The version of Go installed in the environment (" + v .goEnvVersion +
799
- ") is high enough for the version found in the `go.mod` file (" + v .goModVersion + ")."
802
+ ") is high enough for the version found in the `go.mod` file (" + v .goModVersion +
803
+ "). Writing an environment file not specifying any version of Go."
800
804
version = ""
801
805
diagnostics .EmitVersionGoModNotHigherVersionEnvironment (msg )
802
806
}
0 commit comments