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

Method addWarning

internal/config/config.go:285–291  ·  view source on GitHub ↗

addWarning records msg for Warnings unless an identical message was already recorded.

(msg string)

Source from the content-addressed store, hash-verified

283
284// addWarning records msg for Warnings unless an identical message was already recorded.
285func (c *AuthConfig) addWarning(msg string) {
286 c.warningsMu.Lock()
287 defer c.warningsMu.Unlock()
288 if !slices.Contains(c.warnings, msg) {
289 c.warnings = append(c.warnings, msg)
290 }
291}
292
293// SetTokenRefresher supplies the refresher used to renew tokens. Because Authentication returns a single shared
294// AuthConfig, a refresher set once remains available to every later caller.

Callers 1

Calls 1

ContainsMethod · 0.80

Tested by

no test coverage detected