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

Function getDomainName

actor/v7action/route.go:463–474  ·  view source on GitHub ↗
(fullURL, host, path string, port int)

Source from the content-addressed store, hash-verified

461}
462
463func getDomainName(fullURL, host, path string, port int) string {
464 domainWithoutHost := strings.TrimPrefix(fullURL, host+".")
465 domainWithoutPath := strings.TrimSuffix(domainWithoutHost, path)
466
467 if port > 0 {
468 portString := strconv.Itoa(port)
469 domainWithoutPort := strings.TrimSuffix(domainWithoutPath, ":"+portString)
470 return domainWithoutPort
471 }
472
473 return domainWithoutPath
474}

Callers 1

GetRouteSummariesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected