MCPcopy Index your code
hub / github.com/cloudfoundry/cli / GeneratePlatform

Function GeneratePlatform

util/generic/architecture.go:3–18  ·  view source on GitHub ↗
(runtimeGOOS string, runtimeGOARCH string)

Source from the content-addressed store, hash-verified

1package generic
2
3func GeneratePlatform(runtimeGOOS string, runtimeGOARCH string) string {
4 switch {
5 case runtimeGOOS == "linux" && runtimeGOARCH == "amd64":
6 return "linux64"
7 case runtimeGOOS == "linux" && runtimeGOARCH == "386":
8 return "linux32"
9 case runtimeGOOS == "windows" && runtimeGOARCH == "amd64":
10 return "win64"
11 case runtimeGOOS == "windows" && runtimeGOARCH == "386":
12 return "win32"
13 case runtimeGOOS == "darwin":
14 return "osx"
15 default:
16 return ""
17 }
18}

Calls

no outgoing calls

Tested by

no test coverage detected