Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNilReceiver occurs when a method is called on a receiver that was not // expected to be nil. This error can be checked with the == operator. // // Format: // "receiver must not be nil" ErrNilReceiver error )
Functions ¶
func NewErrBadParam ¶
NewErrBadParam returns an error with the given parameter name and reason.
Parameters:
- param_name: The name of the parameter that is invalid.
- reason: The reason the parameter is invalid.
Returns:
- error: An instance of ErrBadParam. Never returns nil.
Format:
"parameter (<param_name>) <reason>"
Where:
- (<param_name>) is the name of the parameter that is invalid. If empty, it is ignored.
- <reason> is the reason the parameter is invalid. If empty, "is not valid" is used.
func NewErrNilParam ¶
NewErrNilParam returns an error with the given parameter name and reason "must not be nil".
Parameters:
- param_name: The name of the parameter that is invalid.
Returns:
- error: An instance of ErrBadParam. Never returns nil.
Format:
"parameter (<param_name>) must not be nil"
Where:
- (<param_name>) is the name of the parameter that is invalid. If empty, it is ignored.
Types ¶
type ErrBadParam ¶
type ErrBadParam struct { // ParamName is the name of the parameter that is invalid. ParamName string // Reason is the reason the parameter is invalid. Reason string }
ErrBadParam occurs when a parameter is not valid.
type Resetter ¶ added in v0.1.2
type Resetter interface { // Reset resets the object. // // Returns: // - error: An error if the object could not be reset. // // Errors: // - common.ErrNilReceiver: If the receiver is nil. // - any other error: Implementation-specific. Reset() error }
Resetter is an interface for objects that can be reset.
Click to show internal directories.
Click to hide internal directories.