Skip to content

Commit 9c5fc97

Browse files
committed
Use "Requesting" instead of "Writing environment file"
1 parent 97ec7a0 commit 9c5fc97

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

go/extractor/cli/go-autobuilder/go-autobuilder.go

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -755,17 +755,16 @@ func getVersionWhenGoModVersionNotFound(v versionInfo) (msg, version string) {
755755
// backwards compatible, so we install the maximum supported version.
756756
msg = "No `go.mod` file found. The version of Go installed in the environment (" +
757757
v.goEnvVersion + ") is outside of the supported range (" + minGoVersion + "-" +
758-
maxGoVersion + "). Writing an environment file specifying the maximum supported " +
759-
"version of Go (" + maxGoVersion + ")."
758+
maxGoVersion + "). Requesting the maximum supported version of Go (" + maxGoVersion +
759+
")."
760760
version = maxGoVersion
761761
diagnostics.EmitNoGoModAndGoEnvUnsupported(msg)
762762
} else {
763763
// The version of Go that is installed is supported. We have no indication which version
764764
// was intended to be used to build this project. We assume that the installed version is
765765
// suitable and do not install a version of Go.
766766
msg = "No `go.mod` file found. Version " + v.goEnvVersion + " installed in the " +
767-
"environment is supported. Writing an environment file not specifying any " +
768-
"version of Go."
767+
"environment is supported. Not requesting any version of Go."
769768
version = ""
770769
diagnostics.EmitNoGoModAndGoEnvSupported(msg)
771770
}
@@ -780,7 +779,7 @@ func getVersionWhenGoModVersionTooHigh(v versionInfo) (msg, version string) {
780779
// range. We do not install a version of Go.
781780
msg = "The version of Go found in the `go.mod` file (" + v.goModVersion +
782781
") is above the supported range (" + minGoVersion + "-" + maxGoVersion +
783-
"). Writing an environment file not specifying any version of Go."
782+
"). Not requesting any version of Go."
784783
version = ""
785784
diagnostics.EmitGoModVersionTooHigh(msg)
786785

@@ -796,8 +795,8 @@ func getVersionWhenGoModVersionTooLow(v versionInfo) (msg, version string) {
796795
// minimum supported version.
797796
msg = "The version of Go found in the `go.mod` file (" + v.goModVersion +
798797
") is below the supported range (" + minGoVersion + "-" + maxGoVersion +
799-
"). No version of Go installed. Writing an environment file specifying the " +
800-
"minimum supported version of Go (" + minGoVersion + ")."
798+
"). No version of Go installed. Requesting the minimum supported version of Go (" +
799+
minGoVersion + ")."
801800
version = minGoVersion
802801
diagnostics.EmitGoModVersionTooLowAndNoGoEnv(msg)
803802
} else if outsideSupportedRange(v.goEnvVersion) {
@@ -808,16 +807,15 @@ func getVersionWhenGoModVersionTooLow(v versionInfo) (msg, version string) {
808807
") is below the supported range (" + minGoVersion + "-" + maxGoVersion +
809808
"). The version of Go installed in the environment (" + v.goEnvVersion +
810809
") is outside of the supported range (" + minGoVersion + "-" + maxGoVersion + "). " +
811-
"Writing an environment file specifying the minimum supported version of Go (" +
812-
minGoVersion + ")."
810+
"Requesting the minimum supported version of Go (" + minGoVersion + ")."
813811
version = minGoVersion
814812
diagnostics.EmitGoModVersionTooLowAndEnvVersionUnsupported(msg)
815813
} else {
816814
// The version of Go that is installed is supported. The version in the `go.mod` file is
817815
// below the supported range. We do not install a version of Go.
818816
msg = "The version of Go installed in the environment (" + v.goEnvVersion +
819817
") is supported and is high enough for the version found in the `go.mod` file (" +
820-
v.goModVersion + "). Writing an environment file not specifying any version of Go."
818+
v.goModVersion + "). Not requesting any version of Go."
821819
version = ""
822820
diagnostics.EmitGoModVersionTooLowAndEnvVersionSupported(msg)
823821
}
@@ -831,16 +829,16 @@ func getVersionWhenGoModVersionSupported(v versionInfo) (msg, version string) {
831829
if !v.goEnvVersionFound {
832830
// There is no Go version installed. The version in the `go.mod` file is supported.
833831
// We install the version from the `go.mod` file.
834-
msg = "No version of Go installed. Writing an environment file specifying the version " +
835-
"of Go found in the `go.mod` file (" + v.goModVersion + ")."
832+
msg = "No version of Go installed. Requesting the version of Go found in the `go.mod` " +
833+
"file (" + v.goModVersion + ")."
836834
version = v.goModVersion
837835
diagnostics.EmitGoModVersionSupportedAndNoGoEnv(msg)
838836
} else if outsideSupportedRange(v.goEnvVersion) {
839837
// The version of Go that is installed is outside of the supported range. The version in
840838
// the `go.mod` file is supported. We install the version from the `go.mod` file.
841839
msg = "The version of Go installed in the environment (" + v.goEnvVersion +
842840
") is outside of the supported range (" + minGoVersion + "-" + maxGoVersion + "). " +
843-
"Writing an environment file specifying the version of Go from the `go.mod` file (" +
841+
"Requesting the version of Go from the `go.mod` file (" +
844842
v.goModVersion + ")."
845843
version = v.goModVersion
846844
diagnostics.EmitGoModVersionSupportedAndGoEnvUnsupported(msg)
@@ -850,8 +848,7 @@ func getVersionWhenGoModVersionSupported(v versionInfo) (msg, version string) {
850848
// the `go.mod` file.
851849
msg = "The version of Go installed in the environment (" + v.goEnvVersion +
852850
") is lower than the version found in the `go.mod` file (" + v.goModVersion +
853-
"). Writing an environment file specifying the version of Go from the `go.mod` " +
854-
"file (" + v.goModVersion + ")."
851+
"). Requesting the version of Go from the `go.mod` file (" + v.goModVersion + ")."
855852
version = v.goModVersion
856853
diagnostics.EmitGoModVersionSupportedHigherGoEnv(msg)
857854
} else {
@@ -860,7 +857,7 @@ func getVersionWhenGoModVersionSupported(v versionInfo) (msg, version string) {
860857
// a version of Go.
861858
msg = "The version of Go installed in the environment (" + v.goEnvVersion +
862859
") is supported and is high enough for the version found in the `go.mod` file (" +
863-
v.goModVersion + "). Writing an environment file not specifying any version of Go."
860+
v.goModVersion + "). Not requesting any version of Go."
864861
version = ""
865862
diagnostics.EmitGoModVersionSupportedLowerEqualGoEnv(msg)
866863
}

0 commit comments

Comments
 (0)