MCPcopy Create free account
hub / github.com/cli/cli / isMockHost

Function isMockHost

script/ghmock/request.go:40–43  ·  view source on GitHub ↗

isMockHost reports whether hostname is github.localhost or one of its subdomains.

(hostname string)

Source from the content-addressed store, hash-verified

38
39// isMockHost reports whether hostname is github.localhost or one of its subdomains.
40func 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.

Callers 1

ServeHTTPMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected