mirror of
https://github.com/goreleaser/goreleaser.git
synced 2024-12-27 01:33:39 +02:00
9bd0033c09
* feat: refactor cli Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * feat: refactor cli Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * feat: refactor cli Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * feat: refactor cli Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * feat: refactor cli Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: revert Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * feat: refactor cli Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * feat: refactor cli Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * feat: refactor cli Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: lint Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> * fix: move Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
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()
|
|
}
|