1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2024-12-27 01:33:39 +02:00
goreleaser/cmd/error.go
Carlos Alexandro Becker 9bd0033c09
feat: refactor main.go to spf13/cobra (#1472)
* 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>
2020-04-27 21:42:44 -03:00

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()
}