Discover Packages
github.com/YuukanOO/seelf
pkg
apperr
package
Version:
v1.1.0
Opens a new window with list of versions in this module.
Published: Nov 17, 2023
License: GPL-3.0
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Same as errors.As but with generics =D
Instantiates a new RuleError with the given code.
Instantiates a new RuleError error which wrap the detail error.
Wrap the given detail error into the base err.
If err is an RuleError, its Detail field will be populated, else
a new RuleError will be created.
type Error struct {
Code string `json:"code"`
Detail error `json:"detail,omitempty"`
}
Represents an application error with an optional detail.
Application errors represent an expected error from the domain perspective.
Infrastructure errors should use the standard errors package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.