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