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