/*
initConfig sets up and configures the application
*/
initConfig sets up and configures the application
/ * initConfig sets up and configures the application * /
func initConfig() {
	if cfgFile != "" {
		viper.SetConfigFile(cfgFile)
	} else {
		home, err := homedir.Dir()
		if err != nil {
			slogger.Fatal(err.Error())
		}
		viper.AddConfigPath(home)
		viper.SetConfigName(".pricewatcher-worker")
	}
	if err := viper.ReadInConfig(); err != nil {
		slogger.Fatal(err.Error())
	}
	slogger.Debug(fmt.Sprintf("Using config file: %s", viper.ConfigFileUsed()))
}
func initConfig ( ) { if cfgFile != " " { viper . SetConfigFile ( cfgFile ) } else { home , err := homedir . Dir ( ) if err != nil { slogger . Fatal ( err . Error ( ) ) } viper . AddConfigPath ( home ) viper . SetConfigName ( " " ) } if err := viper . ReadInConfig ( ) ; err != nil { slogger . Fatal ( err . Error ( ) ) } slogger . Debug ( fmt . Sprintf ( " " , viper . ConfigFileUsed ( ) ) ) }
initConfig sets up and configures the application
initConfig sets up and configures the application