@@ -749,7 +749,7 @@ func checkForUnsupportedVersions(v versionInfo) (msg, version string) {
749749 diagnostics .EmitUnsupportedVersionGoMod (msg )
750750 }
751751
752- if v .goEnVersionFound && outsideSupportedRange (v .goEnvVersion ) {
752+ if v .goEnvVersionFound && outsideSupportedRange (v .goEnvVersion ) {
753753 msg = "The version of Go installed in the environment (" + v .goEnvVersion +
754754 ") is outside of the supported range (" + minGoVersion + "-" + maxGoVersion + ")."
755755 version = ""
@@ -759,26 +759,26 @@ func checkForUnsupportedVersions(v versionInfo) (msg, version string) {
759759 return msg , version
760760}
761761
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
763763// a diagnostic and return the version to install, or the empty string if we should not attempt to
764764// install a version of Go. We assume that `checkForUnsupportedVersions` has already been
765765// called, so any versions that are found are within the supported range.
766766func checkForVersionsNotFound (v versionInfo ) (msg , version string ) {
767- if ! v .goEnVersionFound && ! v .goModVersionFound {
767+ if ! v .goEnvVersionFound && ! v .goModVersionFound {
768768 msg = "No version of Go installed and no `go.mod` file found. Writing an environment " +
769769 "file specifying the maximum supported version of Go (" + maxGoVersion + ")."
770770 version = maxGoVersion
771771 diagnostics .EmitNoGoModAndNoGoEnv (msg )
772772 }
773773
774- if ! v .goEnVersionFound && v .goModVersionFound {
774+ if ! v .goEnvVersionFound && v .goModVersionFound {
775775 msg = "No version of Go installed. Writing an environment file specifying the version " +
776776 "of Go found in the `go.mod` file (" + v .goModVersion + ")."
777777 version = v .goModVersion
778778 diagnostics .EmitNoGoEnv (msg )
779779 }
780780
781- if v .goEnVersionFound && ! v .goModVersionFound {
781+ if v .goEnvVersionFound && ! v .goModVersionFound {
782782 msg = "No `go.mod` file found. Version " + v .goEnvVersion + " installed in the environment."
783783 version = ""
784784 diagnostics .EmitNoGoMod (msg )
@@ -867,13 +867,13 @@ type versionInfo struct {
867867 goModVersion string // The version of Go found in the go directive in the `go.mod` file.
868868 goModVersionFound bool // Whether a `go` directive was found in the `go.mod` file.
869869 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.
871871}
872872
873873func (v versionInfo ) String () string {
874874 return fmt .Sprintf (
875875 "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 )
877877}
878878
879879// Check if Go is installed in the environment.
@@ -888,8 +888,8 @@ func identifyEnvironment() {
888888 depMode := getDepMode ()
889889 v .goModVersion , v .goModVersionFound = tryReadGoDirective (depMode )
890890
891- v .goEnVersionFound = isGoInstalled ()
892- if v .goEnVersionFound {
891+ v .goEnvVersionFound = isGoInstalled ()
892+ if v .goEnvVersionFound {
893893 v .goEnvVersion = getEnvGoVersion ()[2 :]
894894 }
895895
0 commit comments