mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
24 lines
390 B
Go
24 lines
390 B
Go
|
package cmd
|
||
|
|
||
|
type exitError struct {
|
||
|
err error
|
||
|
code int
|
||
|
details string
|
||
|
}
|
||
|
|
||
|
func wrapErrorWithCode(err error, code int, details string) *exitError {
|
||
|
return &exitError{
|
||
|
err: err,
|
||
|
code: code,
|
||
|
details: details,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func wrapError(err error, log string) *exitError {
|
||
|
return wrapErrorWithCode(err, 1, log)
|
||
|
}
|
||
|
|
||
|
func (e *exitError) Error() string {
|
||
|
return e.err.Error()
|
||
|
}
|