MCPcopy Index your code
hub / github.com/cli/cli / HasActiveToken

Method HasActiveToken

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

261
262// HasActiveToken returns true when a token for the hostname is present.
263func (c *AuthConfig) HasActiveToken(hostname string) bool {
264 token, _ := c.ActiveToken(hostname)
265 return token != ""
266}
267
268// HasEnvToken returns true when a token has been specified in an
269// environment variable, else returns false.

Callers

nothing calls this directly

Calls 1

ActiveTokenMethod · 0.95

Tested by

no test coverage detected