Skip to content

Commit

Permalink
improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
peczenyj committed Nov 9, 2023
1 parent 3deeb95 commit fe4edb2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@ errors.Wrap(err, "message")
* The `errors` has no `Wrap`
* The [go-faster/errors](https://github.com/go-faster/errors) demands call `errors.DisableTrace` or build tag `noerrtrace` to disable stack traces.

If you don't need stack traces, this is the right tool for you.

The motivation behind this package is: if you are using [pkg/errors](https://github.com/pkg/errors) or [go-faster/errors](https://github.com/go-faster/errors) should be easier to swich to this package by just change the import (when you can't switch to the standard `errors`).

It means, if your code is already using method such as `Wrap` or `Wrapf`, they are available.

Same for `WithMessage` and `WithMessagef` (however, here it is just an alias to `Wrap` and `Wrapf`).

The useful function `Into` from `go-faster/errors` is also available.

0 comments on commit fe4edb2

Please sign in to comment.