@@ -749,7 +749,7 @@ func checkForUnsupportedVersions(v versionInfo) (msg, version string) {
749
749
diagnostics .EmitUnsupportedVersionGoMod (msg )
750
750
}
751
751
752
- if v .goEnVersionFound && outsideSupportedRange (v .goEnvVersion ) {
752
+ if v .goEnvVersionFound && outsideSupportedRange (v .goEnvVersion ) {
753
753
msg = "The version of Go installed in the environment (" + v .goEnvVersion +
754
754
") is outside of the supported range (" + minGoVersion + "-" + maxGoVersion + ")."
755
755
version = ""
@@ -759,26 +759,26 @@ func checkForUnsupportedVersions(v versionInfo) (msg, version string) {
759
759
return msg , version
760
760
}
761
761
762
- // Check if either `v.goEnVersionFound ` or `v.goModVersionFound` are false. If so, emit
762
+ // Check if either `v.goEnvVersionFound ` or `v.goModVersionFound` are false. If so, emit
763
763
// a diagnostic and return the version to install, or the empty string if we should not attempt to
764
764
// install a version of Go. We assume that `checkForUnsupportedVersions` has already been
765
765
// called, so any versions that are found are within the supported range.
766
766
func checkForVersionsNotFound (v versionInfo ) (msg , version string ) {
767
- if ! v .goEnVersionFound && ! v .goModVersionFound {
767
+ if ! v .goEnvVersionFound && ! v .goModVersionFound {
768
768
msg = "No version of Go installed and no `go.mod` file found. Writing an environment " +
769
769
"file specifying the maximum supported version of Go (" + maxGoVersion + ")."
770
770
version = maxGoVersion
771
771
diagnostics .EmitNoGoModAndNoGoEnv (msg )
772
772
}
773
773
774
- if ! v .goEnVersionFound && v .goModVersionFound {
774
+ if ! v .goEnvVersionFound && v .goModVersionFound {
775
775
msg = "No version of Go installed. Writing an environment file specifying the version " +
776
776
"of Go found in the `go.mod` file (" + v .goModVersion + ")."
777
777
version = v .goModVersion
778
778
diagnostics .EmitNoGoEnv (msg )
779
779
}
780
780
781
- if v .goEnVersionFound && ! v .goModVersionFound {
781
+ if v .goEnvVersionFound && ! v .goModVersionFound {
782
782
msg = "No `go.mod` file found. Version " + v .goEnvVersion + " installed in the environment."
783
783
version = ""
784
784
diagnostics .EmitNoGoMod (msg )
@@ -867,13 +867,13 @@ type versionInfo struct {
867
867
goModVersion string // The version of Go found in the go directive in the `go.mod` file.
868
868
goModVersionFound bool // Whether a `go` directive was found in the `go.mod` file.
869
869
goEnvVersion string // The version of Go found in the environment.
870
- goEnVersionFound bool // Whether an installation of Go was found in the environment.
870
+ goEnvVersionFound bool // Whether an installation of Go was found in the environment.
871
871
}
872
872
873
873
func (v versionInfo ) String () string {
874
874
return fmt .Sprintf (
875
875
"go.mod version: %s, go.mod directive found: %t, go env version: %s, go installation found: %t" ,
876
- v .goModVersion , v .goModVersionFound , v .goEnvVersion , v .goEnVersionFound )
876
+ v .goModVersion , v .goModVersionFound , v .goEnvVersion , v .goEnvVersionFound )
877
877
}
878
878
879
879
// Check if Go is installed in the environment.
@@ -888,8 +888,8 @@ func identifyEnvironment() {
888
888
depMode := getDepMode ()
889
889
v .goModVersion , v .goModVersionFound = tryReadGoDirective (depMode )
890
890
891
- v .goEnVersionFound = isGoInstalled ()
892
- if v .goEnVersionFound {
891
+ v .goEnvVersionFound = isGoInstalled ()
892
+ if v .goEnvVersionFound {
893
893
v .goEnvVersion = getEnvGoVersion ()[2 :]
894
894
}
895
895
0 commit comments