env

package
v0.0.0-...-aba061b Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: GPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidEnvironment = errors.New("invalid environment")

Functions

func Value

func Value(key string) (string, error)

Value read value from environment variable

Types

type EmptyEnvironmentKeyError

type EmptyEnvironmentKeyError struct {
	// contains filtered or unexported fields
}

EmptyEnvironmentKeyError is self described

func NewEmptyEnvironmentKeyError

func NewEmptyEnvironmentKeyError(key string) EmptyEnvironmentKeyError

NewEmptyEnvironmentKeyError is a constructor

func (EmptyEnvironmentKeyError) Error

func (i EmptyEnvironmentKeyError) Error() string

type Environment

type Environment int
const (
	DevelopmentEnvironment Environment = iota + 1
	ProductionEnvironment
)

func ParseEnvironment

func ParseEnvironment(s string) (Environment, error)

func (Environment) IsProduction

func (e Environment) IsProduction() bool

Jump to

Keyboard shortcuts

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