An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.8% dependent packages on proxy.golang.org
Top 4.7% dependent repos on proxy.golang.org

proxy.golang.org : github.com/ibrt/errors

Package errors extends the functionality of Go's built-in error interface: it attaches stack traces to errors and supports behaviors such as carrying debug values and HTTP status codes. Additional behaviors that store metadata on errors can be easily implemented by users. Multiple errors can be merged into a compound one. The package provides several built-in behaviors (Prefix, Metadata, Callers, Skip, PublicMessage, HTTPStatus), ways to wrap and create errors ((Must?)Errorf, (Maybe)?(Must)?Wrap, (Maybe)?(Must?)WrapRecover), ways to compound errors ((Maybe)?Append, ((Maybe?)Split) and utilities (Assert, Ignore, IgnoreClose, Unwrap, Equals). A wrapped error augments Go built-in errors with stack traces and additional behaviors. It can be created from an existing error using one of the Wrap function variants, or from scratch using one of the Errorf variants. To clients it appears to be a generic Go error, but functions in this library understand its magic and can manipulate it accordingly. This library also supports compound errors, i.e. an error composed by multiple inner errors. They can be created using one of the Append function variants, and - if needed - decomposed back using one of the Split function variants. Compound errors can generally be consumed as any other error, although they are subject to special treatment within this library as documented on individual methods.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/ibrt/errors
License: MIT
Latest release: over 6 years ago
First release: over 6 years ago
Namespace: github.com/ibrt
Dependent packages: 1
Dependent repositories: 1
Stars: 1 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 16 days ago

    Loading...
    Readme
    Loading...