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

Method SetHosts

internal/config/config.go:479–483  ·  view source on GitHub ↗

SetHosts will override any hosts resolution and return the given hosts for all calls to Hosts. Use for testing purposes only.

(hosts []string)

Source from the content-addressed store, hash-verified

477// SetHosts will override any hosts resolution and return the given
478// hosts for all calls to Hosts. Use for testing purposes only.
479func (c *AuthConfig) SetHosts(hosts []string) {
480 c.hostsOverride = func() []string {
481 return hosts
482 }
483}
484
485func (c *AuthConfig) DefaultHost() (string, string) {
486 if c.defaultHostOverride != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected