Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Collaps ¶
Collaps create a new error by putting the first path found and the first message found inside the error.
func Wrap ¶
Add the message to an error, if cannot or message already exists, wrap it with another one with the new path Wrap returns nil if err == nil
func WrapPath ¶
Add the path to an error, if cannot or path already exists, wrap it with another one with the new path WrapPath returns nil if err == nil
func WrapWithError ¶
WrapWithError wraps err inside an existing error
Types ¶
type Error ¶
type Error struct { Err error `json:"-"` StatusCode int `json:"_"` Message string `json:"message,omitempty"` Path string `json:"path,omitempty"` Timestamp time.Time `json:"timestamp,omitempty"` }
Error struct easyier error return to the api and is used accross the project.
func NewWithCode ¶
New creates a new error with error code
Click to show internal directories.
Click to hide internal directories.