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

Method HostForAPIHost

api/http_client_test.go:634–637  ·  view source on GitHub ↗

HostForAPIHost resolves via an "api_host: " key holding the host that configured it, mirroring the reverse lookup the real config performs.

(apiHost string)

Source from the content-addressed store, hash-verified

632// HostForAPIHost resolves via an "api_host:<apiHost>" key holding the host that
633// configured it, mirroring the reverse lookup the real config performs.
634func (c tinyConfig) HostForAPIHost(apiHost string) (string, bool) {
635 host, ok := c[fmt.Sprintf("%s:%s", "api_host", apiHost)]
636 return host, ok
637}
638
639// legacyConfig implements the primitive config interface (string return values) that external consumers of this
640// package rely on. It exercises the backward-compatible seam that predates refresh support, so the regression tests

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected