diff options
| author | horus | 2018-02-20 17:44:58 +0100 |
|---|---|---|
| committer | horus | 2018-02-20 17:44:58 +0100 |
| commit | 0bc744ded5814273a9e1f3bf6fd09ffb252e4a87 (patch) | |
| tree | afcf6b7afa886a3234691ea695688b0c914aca48 /crawler/config.go | |
| parent | ff9790d2e5c3482ccd6109adac475a9868fc0ab6 (diff) | |
| download | alkobote-0bc744ded5814273a9e1f3bf6fd09ffb252e4a87.tar.gz | |
Reintroduces debug as a config setting. (crawler)
Diffstat (limited to 'crawler/config.go')
| -rw-r--r-- | crawler/config.go | 3 |
1 files changed, 3 insertions, 0 deletions
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") |
