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

Method addAuthError

pkg/cmd/status/status.go:614–627  ·  view source on GitHub ↗
(msg, ssoURL string)

Source from the content-addressed store, hash-verified

612}
613
614func (s *StatusGetter) addAuthError(msg, ssoURL string) {
615 s.authErrorsMu.Lock()
616 defer s.authErrorsMu.Unlock()
617
618 if s.authErrors == nil {
619 s.authErrors = set.NewStringSet()
620 }
621
622 if ssoURL != "" {
623 s.authErrors.Add(fmt.Sprintf("%s\nAuthorize in your web browser: %s", msg, ssoURL))
624 } else {
625 s.authErrors.Add(msg)
626 }
627}
628
629func (s *StatusGetter) HasAuthErrors() bool {
630 s.authErrorsMu.Lock()

Callers 2

LoadNotificationsMethod · 0.95
LoadSearchResultsMethod · 0.95

Calls 2

NewStringSetFunction · 0.92
AddMethod · 0.65

Tested by

no test coverage detected