Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorFormat ¶ added in v0.28.20240114140844
Types ¶
type ErrFormat ¶ added in v0.28.20240903115607
var ( ErrSimplifyFunc ErrFormat = func(e error) string { return e.Error() + "\n" } ErrActionSimplifyFunc ErrFormat = func(e error) string { if err, ok := e.(Error); ok && string(err.action) != err.Reason { return string(err.action) + ":" + e.Error() + "\n" } else { return e.Error() + "\n" } } ErrInLineFunc ErrFormat = func(e error) string { return "> " + e.Error() + " " } ErrActionInLineFunc ErrFormat = func(e error) string { if err, ok := e.(Error); ok && string(err.action) != err.Reason { return "> " + string(err.action) + ":" + e.Error() + " " } else { return "> " + e.Error() + " " } } )
type Error ¶
type Error struct { Reason string // contains filtered or unexported fields }
func (Error) WithReason ¶ added in v0.28.20240325172911
Click to show internal directories.
Click to hide internal directories.