forked from Elara6331/itd
		
	Watch config for changes and apply automatically
This commit is contained in:
		
							
								
								
									
										1
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								main.go
									
									
									
									
									
								
							| @@ -40,6 +40,7 @@ func init() { | |||||||
| 	viper.AddConfigPath("$HOME/.config") | 	viper.AddConfigPath("$HOME/.config") | ||||||
| 	viper.SetConfigName("itd") | 	viper.SetConfigName("itd") | ||||||
| 	viper.SetConfigType("toml") | 	viper.SetConfigType("toml") | ||||||
|  | 	viper.WatchConfig() | ||||||
| 	viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) | 	viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_")) | ||||||
| 	viper.SetEnvPrefix("itd") | 	viper.SetEnvPrefix("itd") | ||||||
| 	if err := viper.ReadInConfig(); err != nil { | 	if err := viper.ReadInConfig(); err != nil { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user