package
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Jan 23, 2021
License: BSD-3-Clause
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
GetErrorCode get status code of error
func WithCode(code int) errorOption
WithCode with status code
func WithErr(wrapErr error) errorOption
WithErr with wrap error
func WithMsg(msg string) errorOption
WithMsg with error msg
func WithMsgf(msg string, args ...interface{}) errorOption
WithMsgf with formattable error msg
Error stacked error with status code
[Working with Errors in Go 1.13](https://blog.golang.org/go1.13-errors)
func NewError(options ...errorOption) *Error
NewError create error
No need to print wrapped error, `go` print it automatically
Unwrap implement `Unwrap`
Source Files
¶
Click to show internal directories.
Click to hide internal directories.