A .env file in the working directory is now optional
This commit is contained in:
1 parent
0b1952bd69
commit
1e3acaeff3
5 files changed
+30
-9
No files matched your search
@@ -8,8 +8,8 @@ environment variables, merged through [Viper](https://github.com/spf13/viper).
|
||||
## Loading order
|
||||
`Init(cfgFile, &conf)` builds the configuration in this order:
|
||||
|
||||
1. Loads `.env` from the working directory into the environment. A missing
|
||||
`.env` file is an error.
|
||||
1. Loads `.env` from the working directory into the environment, if there
|
||||
is one. A `.env` file that can't be read or parsed is an error.
|
||||
2. Sets the defaults from the `default` struct tags as Viper defaults.
|
||||
3. Reads the config file: `cfgFile` if given, otherwise the first
|
||||
`config.yaml` found in `/etc/job-search` then the working directory. If no
|
||||
|
||||
Reference in new issue
Block a user