Documentation ¶
Index ¶
- Variables
- func DefaultPaths() []string
- func EnvFileToJSONFile(data interface{}, filepathENV, filepathJSON string, perm os.FileMode, ...) error
- func GetDotEnvVal(envPath, varName string) (string, error)
- func JoinEnvNumbered(prefix, delimiter string, startInt uint8, includeBase bool) string
- func LoadDotEnv(paths ...string) ([]string, error)
- func LoadDotEnvFirst(paths ...string) error
- func LoadDotEnvSkipEmpty(paths ...string) error
- func LoadDotEnvSkipEmptyInfo(paths ...string) ([]string, error)
- func LoadEnvDefaults() error
- func LoadEnvPathsPrioritized(fixedPath, envPath string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EnvPathVar = "ENV_PATH" LocalPath = "./.env" )
Functions ¶
func DefaultPaths ¶
func DefaultPaths() []string
func EnvFileToJSONFile ¶
func EnvFileToJSONFile(data interface{}, filepathENV, filepathJSON string, perm os.FileMode, prefix, indent string) error
EnvFileToJSONFile Converts an .env file to a JSON file using the definition provided in data.
func GetDotEnvVal ¶
GetDotEnvVal retrieves a single var from a `.env` file path
func JoinEnvNumbered ¶
Return a merged environment var which is split into multiple vars. This is useful when the system has a size limit on environment variables.
func LoadDotEnv ¶
func LoadDotEnvFirst ¶
func LoadDotEnvSkipEmpty ¶
func LoadDotEnvSkipEmptyInfo ¶
func LoadEnvDefaults ¶
func LoadEnvDefaults() error
func LoadEnvPathsPrioritized ¶
LoadEnvPaths attempts to load an explicit, env and current path. It returns an error ifexplicit/env paths are present but do not exist or are empty. This is was designed to flexibly handle common .env file paths in a prioritzed and differentiated order.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.