diff options
author | Alan Pearce | 2024-11-28 15:12:00 +0100 |
---|---|---|
committer | Alan Pearce | 2024-11-28 15:12:00 +0100 |
commit | b94f66cfe5bf87ec6d2a32448ca5c55ba118c7aa (patch) | |
tree | eb6f951b3a0959c6ace7be6f111124791e90c54d /internal/config/config.go | |
parent | 183b0c8b5edbcf4224d4dd3905ca483204522656 (diff) | |
download | website-b94f66cfe5bf87ec6d2a32448ca5c55ba118c7aa.tar.lz website-b94f66cfe5bf87ec6d2a32448ca5c55ba118c7aa.tar.zst website-b94f66cfe5bf87ec6d2a32448ca5c55ba118c7aa.zip |
Use errors.WithMessage in place of .Wrap
Diffstat (limited to 'internal/config/config.go')
-rw-r--r-- | internal/config/config.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 7ccad85..000dc6f 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -28,7 +28,7 @@ type URL struct { 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 @@ func GetConfig(dir string, log *log.Logger) (*Config, error) { return nil, errors.WithMessage(t, t.ErrorWithUsage()) } - return nil, errors.Wrap(err, "config error") + return nil, errors.WithMessage(err, "config error") } return &config, nil |