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

Method Warnings

internal/config/config.go:278–282  ·  view source on GitHub ↗

Warnings returns the deduplicated warnings recorded so far in this process, such as a skipped token refresh, in the order they were first recorded. Callers are expected to show them to the user before gh exits.

()

Source from the content-addressed store, hash-verified

276// Warnings returns the deduplicated warnings recorded so far in this process, such as a skipped token refresh, in the
277// order they were first recorded. Callers are expected to show them to the user before gh exits.
278func (c *AuthConfig) Warnings() []string {
279 c.warningsMu.Lock()
280 defer c.warningsMu.Unlock()
281 return slices.Clone(c.warnings)
282}
283
284// addWarning records msg for Warnings unless an identical message was already recorded.
285func (c *AuthConfig) addWarning(msg string) {

Callers

nothing calls this directly

Calls 1

CloneMethod · 0.65

Tested by

no test coverage detected