MCPcopy
hub / github.com/cli/cli / FlagErrorf

Function FlagErrorf

pkg/cmdutil/errors.go:12–14  ·  view source on GitHub ↗

FlagErrorf returns a new FlagError that wraps an error produced by fmt.Errorf(format, args...).

(format string, args ...interface{})

Source from the content-addressed store, hash-verified

10// FlagErrorf returns a new FlagError that wraps an error produced by
11// fmt.Errorf(format, args...).
12func FlagErrorf(format string, args ...interface{}) error {
13 return FlagErrorWrap(fmt.Errorf(format, args...))
14}
15
16// FlagErrorWrap returns a new FlagError that wraps the specified error.
17func FlagErrorWrap(err error) error { return &FlagError{err} }

Callers 15

NewCmdDeleteFunction · 0.92
NewCmdListFunction · 0.92
NewCmdCompletionFunction · 0.92
NewCmdViewFunction · 0.92
NewCmdListFunction · 0.92
NewCmdCommentFunction · 0.92
NewCmdCreateFunction · 0.92
NewCmdEditFunction · 0.92
editRunFunction · 0.92
NewCmdViewFunction · 0.92
NewCmdListFunction · 0.92
NewCmdListFunction · 0.92

Calls 2

FlagErrorWrapFunction · 0.85
ErrorfMethod · 0.65

Tested by 3

TestNewCmdGetFunction · 0.74
TestNewCmdCheckoutFunction · 0.74
Test_printErrorFunction · 0.74