summaryrefslogtreecommitdiff
path: root/crawler/config.go
diff options
context:
space:
mode:
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")