isMockHost reports whether hostname is github.localhost or one of its subdomains.
(hostname string)
| 38 | |
| 39 | // isMockHost reports whether hostname is github.localhost or one of its subdomains. |
| 40 | func isMockHost(hostname string) bool { |
| 41 | h := strings.ToLower(hostname) |
| 42 | return h == mockHost || strings.HasSuffix(h, "."+mockHost) |
| 43 | } |
| 44 | |
| 45 | // isAPIHost reports whether gh sends REST and GraphQL calls to hostname, for |
| 46 | // github.com or, with --localhost, for github.localhost. |