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

Method HasActiveToken

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

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

Callers

nothing calls this directly

Calls 1

ActiveTokenMethod · 0.95

Tested by

no test coverage detected