isAPIHost reports whether gh sends REST and GraphQL calls to hostname, for github.com or, with --localhost, for github.localhost.
(hostname string)
| 45 | // isAPIHost reports whether gh sends REST and GraphQL calls to hostname, for |
| 46 | // github.com or, with --localhost, for github.localhost. |
| 47 | func isAPIHost(hostname string) bool { |
| 48 | h := strings.ToLower(hostname) |
| 49 | return h == dotcomAPIHost || h == apiHost |
| 50 | } |
| 51 | |
| 52 | // requestName returns the name responses are stored under: "graphql Operation" |
| 53 | // for GraphQL calls and "METHOD /path" for REST calls to the API host. Calls to |
no outgoing calls
no test coverage detected