Watch config for changes and apply automatically

This commit is contained in:
Elara 2021-08-21 03:07:48 -07:00
parent cf1794215e
commit 031295ad9a

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 {