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

Method Warnings

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

288// Warnings returns the deduplicated warnings recorded so far in this process, such as a skipped token refresh, in the
289// order they were first recorded. Callers are expected to show them to the user before gh exits.
290func (c *AuthConfig) Warnings() []string {
291 c.warningsMu.Lock()
292 defer c.warningsMu.Unlock()
293 return slices.Clone(c.warnings)
294}
295
296// addWarning records msg for Warnings unless an identical message was already recorded.
297func (c *AuthConfig) addWarning(msg string) {

Callers

nothing calls this directly

Calls 1

CloneMethod · 0.65

Tested by

no test coverage detected