From 0bc744ded5814273a9e1f3bf6fd09ffb252e4a87 Mon Sep 17 00:00:00 2001 From: horus Date: Tue, 20 Feb 2018 17:44:58 +0100 Subject: Reintroduces debug as a config setting. (crawler) --- crawler/config.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crawler/config.go') diff --git a/crawler/config.go b/crawler/config.go index f342e30..20f8d13 100644 --- a/crawler/config.go +++ b/crawler/config.go @@ -21,6 +21,7 @@ type Config struct { Polr_URL string Polr_API_Key string + Debug bool FixDatabase bool ShopIDs []string } @@ -35,6 +36,7 @@ func (c *Config) parseConfig(configFile string) { viper.SetDefault("DB_Path", "./alkobote.db") + viper.SetDefault("Debug", false) viper.SetDefault("FixDatabase", false) viper.SetDefault("DisableURLShorter", false) viper.SetDefault("ShopIDs", []string{}) @@ -85,6 +87,7 @@ func (c *Config) setsConfig() { c.DBDBName = viper.GetString("DB_DBName") c.DBOptions = viper.GetString("DB_Options") c.DBPath = viper.GetString("DB_Path") + c.Debug = viper.GetBool("Debug") c.FixDatabase = viper.GetBool("FixDatabase") c.DisableURLShorter = viper.GetBool("DisableURLShorter") c.ShopIDs = viper.GetStringSlice("ShopIDs") -- cgit v1.2.3