Releases: Southclaws/fault
Releases · Southclaws/fault
v0.4.1
Add newf for formatting fundamental/root errors.
Rename subpackages
See #5 for rationale
- renamed
errctx
tofctx
- renamed
kind
toftag
- renamed
issue
tofmsg
and removedfault.Msg
built-in functionality, users can just usefmsg
now as it does the same thing
So now if you want to use all the included utilities, it's a little less noisy:
return fault.Wrap(err,
fctx.With(ctx),
ftag.With(ftag.NotFound),
fmsg.With("failed to do something"),
)
and since everything starts with f
and gopls can filter suggestions based on what you've already typed and the expected type (which is func(error) error`) then you can very easily find and use the built-ins.
Error utilities
Split the functionality into simpler sub packages. No more stack traces, no more messages. pkg/errors already does this.
- Added errctx for bridging the gap between context and errors.
- Added errmeta which includes the core functionality of the original fault code
- Added errtag which allows tagging errors with well defined types