all repos — homestead @ 2ea9b6cc0c1249f062d2d01c46a280c51f6b9769

Code for my website

Use errors.WithMessage in place of .Wrap

Alan Pearce
commit

2ea9b6cc0c1249f062d2d01c46a280c51f6b9769

parent

5c9eb456d14c37acfb1294425f607810ddebb302

1 file changed, 2 insertions(+), 2 deletions(-)

changed files
M internal/config/config.gointernal/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