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

Function printError

pkg/cmd/ssh-key/list/list.go:121–128  ·  view source on GitHub ↗
(w io.Writer, err error)

Source from the content-addressed store, hash-verified

119}
120
121func printError(w io.Writer, err error) {
122 fmt.Fprintln(w, "warning: ", err)
123 if httpErr, ok := errors.AsType[api.HTTPError](err); ok {
124 if msg := httpErr.ScopesSuggestion(); msg != "" {
125 fmt.Fprintln(w, msg)
126 }
127 }
128}

Callers 1

listRunFunction · 0.70

Calls 1

ScopesSuggestionMethod · 0.80

Tested by

no test coverage detected