summaryrefslogtreecommitdiff
path: root/crawler/config.go
diff options
context:
space:
mode:
authorhorus2018-02-20 17:44:58 +0100
committerhorus2018-02-20 17:44:58 +0100
commit0bc744ded5814273a9e1f3bf6fd09ffb252e4a87 (patch)
treeafcf6b7afa886a3234691ea695688b0c914aca48 /crawler/config.go
parentff9790d2e5c3482ccd6109adac475a9868fc0ab6 (diff)
downloadalkobote-0bc744ded5814273a9e1f3bf6fd09ffb252e4a87.tar.gz
Reintroduces debug as a config setting. (crawler)
Diffstat (limited to 'crawler/config.go')
-rw-r--r--crawler/config.go3
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")