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.
()
| 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. |
| 278 | func (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. |
| 285 | func (c *AuthConfig) addWarning(msg string) { |