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

Method addWarning

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

295
296// addWarning records msg for Warnings unless an identical message was already recorded.
297func (c *AuthConfig) addWarning(msg string) {
298 c.warningsMu.Lock()
299 defer c.warningsMu.Unlock()
300 if !slices.Contains(c.warnings, msg) {
301 c.warnings = append(c.warnings, msg)
302 }
303}
304
305// SetTokenRefresher supplies the refresher used to renew tokens. Because Authentication returns a single shared
306// AuthConfig, a refresher set once remains available to every later caller.

Callers 1

Calls 1

ContainsMethod · 0.80

Tested by

no test coverage detected