Watch config for changes and apply automatically

This commit is contained in:
Elara 2021-08-21 03:07:48 -07:00
parent 60d2053894
commit 4a195f8311
1 changed files with 1 additions and 0 deletions

View File

@ -40,6 +40,7 @@ func init() {
viper.AddConfigPath("$HOME/.config")
viper.SetConfigName("itd")
viper.SetConfigType("toml")
viper.WatchConfig()
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.SetEnvPrefix("itd")
if err := viper.ReadInConfig(); err != nil {