MCPcopy
hub / github.com/getsops/sops / NewExitError

Function NewExitError

cmd/sops/common/common.go:165–170  ·  view source on GitHub ↗

NewExitError returns a cli.ExitError given an error (wrapped in a generic interface{}) and an exit code to represent the failure

(i interface{}, exitCode int)

Source from the content-addressed store, hash-verified

163// NewExitError returns a cli.ExitError given an error (wrapped in a generic interface{})
164// and an exit code to represent the failure
165func NewExitError(i interface{}, exitCode int) *cli.ExitError {
166 if userErr, ok := i.(sops.UserError); ok {
167 return NewExitError(userErr.UserError(), exitCode)
168 }
169 return cli.NewExitError(i, exitCode)
170}
171
172// StoreForFormat returns the correct format-specific implementation
173// of the Store interface given the format.

Callers 15

setFunction · 0.92
encryptFunction · 0.92
unsetFunction · 0.92
decryptFunction · 0.92
extractFunction · 0.92
editExampleFunction · 0.92
editTreeFunction · 0.92
editTreeImplFunction · 0.92
runEditorUntilOkFunction · 0.92
rotateFunction · 0.92
mainFunction · 0.92
getEncryptConfigFunction · 0.92

Calls 1

UserErrorMethod · 0.65

Tested by

no test coverage detected