Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Err = errorlogger.Err
View Source
var Log = errorlogger.Log
Functions ¶
This section is empty.
Types ¶
type EnvironmentError ¶
type EnvironmentError struct {
// name of the environment variable that was requested
VarName string
// using wrapped error to work with errors.Is()
Err error `default:"os.ErrNotExist"`
}
EnvironmentError records an error related to an environment variable.
func NewEnvironmentError ¶
func NewEnvironmentError(name string) *EnvironmentError
NewEnvironmentError returns an *EnvironmentError related to the given environment variable.
The EnvironmentError wraps os.ErrNotExist for use with errors.Is()
func (*EnvironmentError) Error ¶
func (e *EnvironmentError) Error() string
func (*EnvironmentError) Is ¶
func (m *EnvironmentError) Is(target error) bool
func (*EnvironmentError) Timeout ¶
func (e *EnvironmentError) Timeout() bool
Timeout reports whether this error represents a timeout. Likely not used in EnvironmentError, but available for completeness and testing.
func (*EnvironmentError) Unwrap ¶
func (e *EnvironmentError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.