Use errors.WithMessage in place of .Wrap
1 file changed, 2 insertions(+), 2 deletions(-)
changed files
M internal/config/config.go → internal/config/config.go
@@ -28,7 +28,7 @@ func (u *URL) UnmarshalText(text []byte) (err error) { u.URL, err = url.Parse(string(text)) - return errors.Wrapf(err, "could not parse URL %s", string(text)) + return errors.WithMessagef(err, "could not parse URL %s", string(text)) } type Config struct {@@ -65,7 +65,7 @@ case *toml.ParseError: return nil, errors.WithMessage(t, t.ErrorWithUsage()) } - return nil, errors.Wrap(err, "config error") + return nil, errors.WithMessage(err, "config error") } return &config, nil