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

Top 8.4% on proxy.golang.org
Top 2.8% dependent packages on proxy.golang.org
Top 2.9% dependent repos on proxy.golang.org

proxy.golang.org : github.com/cpuguy83/strongerrors

Package strongerrors defines a set of error interfaces that packages should use for communicating classes of errors. Errors that cross the package boundary should implement one (and only one) of these interfaces. Packages should not reference these interfaces directly, only implement them. To check if a particular error implements one of these interfaces, there are helper functions provided (e.g. `Is<SomeError>`) which can be used rather than asserting the interfaces directly. If you must assert on these interfaces, be sure to check the causal chain (`err.Cause()`). A set of helper functions are provided to take any error and turn it into a specific error class. This frees you from defining the same error classes all over your code. However, you can still implement the error classes ony our own if you desire.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/cpuguy83/strongerrors
License: Apache-2.0
Latest release: over 6 years ago
First release: over 7 years ago
Namespace: github.com/cpuguy83
Dependent packages: 4
Dependent repositories: 3
Stars: 12 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 10 days ago

    Loading...
    Readme
    Loading...