diff options
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 f74253e..27aaa45 100644 --- a/crawler/config.go +++ b/crawler/config.go @@ -20,6 +20,7 @@ type Config struct { Debug bool FixDatabase bool + ShopIDs []string } // Parses the configuration and sets the configuration struct. @@ -35,6 +36,7 @@ func (c *Config) parseConfig(configFile string) { viper.SetDefault("Debug", false) viper.SetDefault("FixDatabase", false) viper.SetDefault("DisableURLShorter", false) + viper.SetDefault("ShopIDs", []string{}) // Name of the configuration file viper.SetConfigName("config") @@ -77,6 +79,7 @@ func (c *Config) setsConfig() { c.Debug = viper.GetBool("Debug") c.FixDatabase = viper.GetBool("FixDatabase") c.DisableURLShorter = viper.GetBool("DisableURLShorter") + c.ShopIDs = viper.GetStringSlice("ShopIDs") c.Polr_URL = viper.GetString("Polr_URL") c.Polr_API_Key = viper.GetString("Polr_API_Key") } |
