You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
365 B
Go
15 lines
365 B
Go
package commands
|
|
|
|
import "github.com/go-errors/errors"
|
|
|
|
// WrapError wraps an error for the sake of showing a stack trace at the top level
|
|
// the go-errors package, for some reason, does not return nil when you try to wrap
|
|
// a non-error, so we're just doing it here
|
|
func WrapError(err error) error {
|
|
if err == nil {
|
|
return err
|
|
}
|
|
|
|
return errors.Wrap(err, 0)
|
|
}
|