Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomErr ¶
type CustomErr[T any] interface { // Error is a method that returns error text Error() string // Info is a method that returning additional info for error Info() T }
func NewCustomErr ¶
NewCustomErr is a custom error constructor Usage:
type ErrInfo struct { Critical bool } errx := errorsx.NewCustomErr("Message", ErrInfo{ Critical: false, }) if errx != nil { errInf := errx.Info() fmt.Println("Error:", errx.Error()) fmt.Println("Critical:", errInf.Critical) }
Directories ¶
Path | Synopsis |
---|---|
Package domain_errors provides errors that I use in my applications on the domain layer.
|
Package domain_errors provides errors that I use in my applications on the domain layer. |
Package slog_helpers provides functionality to transform some golang types into a loggable by the package log/slog.
|
Package slog_helpers provides functionality to transform some golang types into a loggable by the package log/slog. |
Click to show internal directories.
Click to hide internal directories.