MCPcopy
hub / github.com/cloudfoundry/cli / PrefixedRandomName

Function PrefixedRandomName

integration/helpers/name_generator.go:162–168  ·  view source on GitHub ↗

PrefixedRandomName provides a random name with structure "namePrefix-randomstring"

(namePrefix string)

Source from the content-addressed store, hash-verified

160
161// PrefixedRandomName provides a random name with structure "namePrefix-randomstring"
162func PrefixedRandomName(namePrefix string) string {
163 testName := os.Getenv("CF_INT_TEST_NAME")
164 if len(testName) > 0 {
165 namePrefix += "-" + testName
166 }
167 return namePrefix + "-" + RandomName()
168}
169
170// RandomName provides a random string
171func RandomName() string {

Calls 1

RandomNameFunction · 0.85

Tested by 1

ExampleWithHelloWorldAppFunction · 0.74