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

Method HasActiveToken

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

366
367// HasActiveToken returns true when a token for the hostname is present.
368func (c *AuthConfig) HasActiveToken(hostname string) bool {
369 return c.ActiveToken(hostname).Token != ""
370}
371
372// HasEnvToken returns true when a token has been specified in an
373// environment variable, else returns false.

Callers

nothing calls this directly

Calls 1

ActiveTokenMethod · 0.95

Tested by

no test coverage detected