Documentation
¶
Overview ¶
Package envfile parses .env files into key/value pairs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("no volcano.env file found.\ncreate volcano/volcano.env or use --file to specify a path")
ErrNotFound is returned when no path is given and neither default location holds an env file.
Functions ¶
func LoadFirstEnvVars ¶
LoadFirstEnvVars reads the first existing env file from candidates and returns its variables as sorted KEY=value entries. If no candidate exists, it returns nil and no error.
func ResolvePath ¶ added in v0.45.0
ResolvePath returns the env file Load would read. An explicit path must exist; otherwise it looks for volcano/volcano.env and ./volcano.env, returns ErrNotFound when neither exists, and an error when both do.
Types ¶
Click to show internal directories.
Click to hide internal directories.