xerrors over fmt

This commit is contained in:
Steven Masley 2024-02-28 11:34:40 -06:00
parent 4d1abfe59d
commit 8c2c07720a
1 changed files with 1 additions and 1 deletions

View File

@ -566,7 +566,7 @@ func ShowUsageOnError(next HandlerFunc) HandlerFunc {
return func(i *Invocation) error {
err := next(i)
if err != nil {
return fmt.Errorf("Usage: %s\nError: %w", i.Command.FullUsage(), err)
return xerrors.Errorf("Usage: %s\nError: %w", i.Command.FullUsage(), err)
}
return nil
}