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

Function NewDomainName

integration/helpers/name_generator.go:134–139  ·  view source on GitHub ↗

NewDomainName provides a random domain name prefixed with integration. If prefix is provided the domain name will have structure "integration-prefix-randomstring.com" else it will have structure "integration-randomstring.com"

(prefix ...string)

Source from the content-addressed store, hash-verified

132// NewDomainName provides a random domain name prefixed with integration. If prefix is provided the domain name
133// will have structure "integration-prefix-randomstring.com" else it will have structure "integration-randomstring.com"
134func NewDomainName(prefix ...string) string {
135 if len(prefix) > 0 {
136 return fmt.Sprintf("integration-%s.com", PrefixedRandomName(prefix[0]))
137 }
138 return fmt.Sprintf("integration%s.com", PrefixedRandomName(""))
139}
140
141// NewRouterGroupName provides a random name prefixed with INTEGRATION-ROUTER-GROUP
142func NewRouterGroupName() string {

Calls 1

PrefixedRandomNameFunction · 0.85

Tested by

no test coverage detected