Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNilReceiver occurs when a method is called on a receiver that is nil. This // error can be checked with the == operator. // // Format: // "receiver must not be nil" ErrNilReceiver error )
Functions ¶
func NewErrBadParam ¶
NewErrBadParam creates and returns a new ErrBadParam error with the specified parameter name and error message.
Parameters:
- name: The name of the parameter.
- msg: The error message.
Returns:
- error: A pointer to the newly created ErrBadParam. Never returns nil.
Format:
"parameter (<name>) <msg>"
Where:
- <name> is the name of the parameter. If empty, it is omitted.
- <msg> is the error message. If empty, defaults to "is not valid".
func NewErrNilParam ¶
NewErrNilParam creates and returns a new ErrBadParam error with the specified parameter name and error message "must not be nil".
Parameters:
- name: The name of the parameter.
Returns:
- error: A pointer to the newly created ErrBadParam. Never returns nil.
Format:
"parameter (<name>) must not be nil"
Where, <name> is the name of the parameter. If empty, it is omitted.
Types ¶
type ErrBadParam ¶
type ErrBadParam struct { // Name is the name of the parameter. Name string // Msg is the error message. Msg string }
ErrBadParam occurs when a parameter is not valid.
Click to show internal directories.
Click to hide internal directories.