Help us shape the future of Go! Take the 2026 Go Developer Survey

logging

package
v0.1.0-1631153474257730 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL