env

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEF_ENV_FILE = ".env"
)

Variables

This section is empty.

Functions

func LoadEnv

func LoadEnv() error

default from exe folder

func LoadEnvFile added in v0.0.18

func LoadEnvFile(envFile string) error

func LoadEnvsFromYaml

func LoadEnvsFromYaml(file *string) (ok bool)

func LoadFromBoth added in v0.0.18

func LoadFromBoth() error

func LoadFromExeDir added in v0.0.18

func LoadFromExeDir() error

func LoadFromWd added in v0.0.18

func LoadFromWd() error

for dev mode, exe bin in a tmp random folder, so wd is fine

Types

type Environment

type Environment interface {
	Value() string
	IsDev() bool
	IsFat() bool
	IsUat() bool
	IsProd() bool
	// contains filtered or unexported methods
}

Environment

func Active

func Active() Environment

Active current config's env

Jump to

Keyboard shortcuts

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