addWarning records msg for Warnings unless an identical message was already recorded.
(msg string)
| 283 | |
| 284 | // addWarning records msg for Warnings unless an identical message was already recorded. |
| 285 | func (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. |
no test coverage detected