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

Method SetHosts

internal/config/config.go:503–507  ·  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

501// SetHosts will override any hosts resolution and return the given
502// hosts for all calls to Hosts. Use for testing purposes only.
503func (c *AuthConfig) SetHosts(hosts []string) {
504 c.hostsOverride = func() []string {
505 return hosts
506 }
507}
508
509func (c *AuthConfig) DefaultHost() (string, string) {
510 if c.defaultHostOverride != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected