✨ Allow MYLOG_CONFIG_PATH to override the config path
This commit is contained in:
parent
b7eaf941fb
commit
edf10de879
4 changed files with 18 additions and 20 deletions
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
## Config System
|
||||
- Viper instance is stored in context using a custom key type (`confKeyType`)
|
||||
- Use `config.New(path, overrides)` to create a new viper instance
|
||||
- Use `config.New(ctx, path)` to create a new viper instance
|
||||
- Use `config.RetrieveFromContext(ctx)` to get both viper and the unmarshaled Config struct
|
||||
- Formatters can use `v.Sub("formatters." + kind)` to get their own sub-config and unmarshal into their specific config struct
|
||||
- Test files must create viper instances and add them to context using `config.AddToContext`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue