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

Method HasActiveToken

internal/config/config.go:276–279  ·  view source on GitHub ↗

HasActiveToken returns true when a token for the hostname is present.

(hostname string)

Source from the content-addressed store, hash-verified

274
275// HasActiveToken returns true when a token for the hostname is present.
276func (c *AuthConfig) HasActiveToken(hostname string) bool {
277 token, _ := c.ActiveToken(hostname)
278 return token != ""
279}
280
281// HasEnvToken returns true when a token has been specified in an
282// environment variable, else returns false.

Callers

nothing calls this directly

Calls 1

ActiveTokenMethod · 0.95

Tested by

no test coverage detected