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)
| 163 | // NewExitError returns a cli.ExitError given an error (wrapped in a generic interface{}) |
| 164 | // and an exit code to represent the failure |
| 165 | func 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. |
no test coverage detected