env

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EnvNamePrefix    = "TGC_"       // Tron-Go-Common
	EnvNamePrefixEnv = "TGC_PREFIX" // Env var to override "TGC_"

	EnvDev     = "dev"
	EnvStaging = "staging"
	EnvProd    = "production"
)

Variables

View Source
var (
	LogFile = ""
)

Functions

func GetCurrentEnv

func GetCurrentEnv() string

func GetEnv

func GetEnv(name string) (string, string)

GetEnv checks the prefix settings and returns the correct application- specific environment variable value

func IsDev

func IsDev() bool

func IsProd

func IsProd() bool

func IsStaging

func IsStaging() bool

func SetCurrentEnv

func SetCurrentEnv(env string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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