Skip to content

Commit 55fe318

Browse files
authored
Merge pull request github#13397 from owen-mc/go/document-build-environment-recommendations
Add Go version table for --identify-environment
2 parents 1b83aeb + 6985463 commit 55fe318

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,17 @@ func getVersionWhenGoModVersionSupported(v versionInfo) (msg, version string) {
910910

911911
// Check the versions of Go found in the environment and in the `go.mod` file, and return a
912912
// version to install. If the version is the empty string then no installation is required.
913+
// We never return a version of Go that is outside of the supported range.
914+
//
915+
// +-----------------------+-----------------------+-----------------------+-----------------------------------------------------+------------------------------------------------+
916+
// | Found in go.mod > | *None* | *Below min supported* | *In supported range* | *Above max supported |
917+
// | Installed \/ | | | | |
918+
// |-----------------------|-----------------------|-----------------------|-----------------------------------------------------|------------------------------------------------|
919+
// | *None* | Install max supported | Install min supported | Install version from go.mod | Install max supported |
920+
// | *Below min supported* | Install max supported | Install min supported | Install version from go.mod | Install max supported |
921+
// | *In supported range* | No action | No action | Install version from go.mod if newer than installed | Install max supported if newer than installed |
922+
// | *Above max supported* | Install max supported | Install min supported | Install version from go.mod | No action |
923+
// +-----------------------+-----------------------+-----------------------+-----------------------------------------------------+------------------------------------------------+
913924
func getVersionToInstall(v versionInfo) (msg, version string) {
914925
if !v.goModVersionFound {
915926
return getVersionWhenGoModVersionNotFound(v)

0 commit comments

Comments
 (0)