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

Function PreferredStack

integration/helpers/stack.go:40–50  ·  view source on GitHub ↗

PreferredStack returns the cflinuxfs4 stack name if it present, otherwise cflinuxfs3 is returned.

()

Source from the content-addressed store, hash-verified

38
39// PreferredStack returns the cflinuxfs4 stack name if it present, otherwise cflinuxfs3 is returned.
40func PreferredStack() string {
41 stacks := FetchStacks()
42
43 for _, name := range stacks {
44 if name == "cflinuxfs4" {
45 return name
46 }
47 }
48
49 return "cflinuxfs3"
50}
51
52// CreateStack creates a new stack with the user provided name. If a name is not provided, a random name is used
53func CreateStack(names ...string) string {

Calls 1

FetchStacksFunction · 0.85

Tested by

no test coverage detected