Skip to content
tlog-devPublic

About

Go stdlib errors package extension.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

58 Commits

Folders and files

Repository files navigation

Documentation Go workflow CircleCI codecov Go Report Card GitHub tag (latest SemVer)

errors

errors is a wrapper around the standard errors.New and fmt.Errorf functions. It unifies their APIs, allowing you to create new errors or wrap existing ones with rich context (formatted message with arguments).

It provides two core functions:

errors.New(format string, args ...any) error
errors.Wrap(err error, format string, args ...any) error

While it previously had more features, I eventually realized that, in most cases, anything beyond simple error wrapping is an overcomplication.

About

Go stdlib errors package extension.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages