env

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

View Source
const (
	VarEnviroment = "APP_ENV"
	VarWorkDir    = "workdir"
	VarBaseDir    = "basedir"
)
View Source
const (
	Development = "development"
	Production  = "production"
	Test        = "test"
)

Variables

This section is empty.

Functions

func Array added in v0.5.0

func Array(key string, def string) []string

func Basedir added in v0.5.0

func Basedir() string

func Bool added in v0.5.0

func Bool(key string, value ...bool) bool

func Duration added in v0.5.0

func Duration(key string, values ...time.Duration) *time.Duration

func Int added in v0.5.0

func Int[T ~int | ~int32 | ~int8 | ~int64](key string, value ...T) T

func Load added in v0.5.0

func Load(name string) (bool, string, error)

Follows this convention:

https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use

func String added in v0.5.0

func String(key string, defs ...string) string

func StringOrNil added in v0.5.0

func StringOrNil(key string) *string

func Workdir added in v0.5.0

func Workdir() string

func WorkdirPlus added in v0.5.0

func WorkdirPlus(elem ...string) (ret string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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