MCPcopy
hub / github.com/cli/cli / TenantName

Function TenantName

internal/ghinstance/host.go:27–30  ·  view source on GitHub ↗

TenantName extracts the tenant name from tenancy host name and reports whether it found the tenant name.

(h string)

Source from the content-addressed store, hash-verified

25// TenantName extracts the tenant name from tenancy host name and
26// reports whether it found the tenant name.
27func TenantName(h string) (string, bool) {
28 normalizedHostName := ghauth.NormalizeHostname(h)
29 return strings.CutSuffix(normalizedHostName, "."+tenancyHost)
30}
31
32func isGarage(h string) bool {
33 return strings.EqualFold(h, "garage.github.com")

Callers 4

NewInspectCmdFunction · 0.92
NewVerifyCmdFunction · 0.92
FormatRemoteURLFunction · 0.92
TestTenantNameFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestTenantNameFunction · 0.68