diff options
| author | horus_arch | 2018-02-17 15:22:51 +0100 |
|---|---|---|
| committer | horus_arch | 2018-02-17 15:22:51 +0100 |
| commit | 8a94fd9d4b54e05ecd11ce4bc1fd9b0feb92b239 (patch) | |
| tree | 224cb505fcc05748cc23b131607194c0dfaec8bc /crawler/config.go | |
| parent | fc83917d623228b09191f178062e59fad0722795 (diff) | |
| download | alkobote-8a94fd9d4b54e05ecd11ce4bc1fd9b0feb92b239.tar.gz | |
Sets config option to disable url shorter. (crawler)
Diffstat (limited to 'crawler/config.go')
| -rw-r--r-- | crawler/config.go | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/crawler/config.go b/crawler/config.go index 2eb7d03..c9b17a4 100644 --- a/crawler/config.go +++ b/crawler/config.go @@ -5,16 +5,17 @@ import ( ) type Config struct { - DBDriver string - DBDBName string - DBHost string - DBPort string - DBUser string - DBPassword string - DBOptions string - DBPath string // for sqlite - Polr_URL string - Polr_API_Key string + DBDriver string + DBDBName string + DBHost string + DBPort string + DBUser string + DBPassword string + DBOptions string + DBPath string // for sqlite + DisableURLShorter bool + Polr_URL string + Polr_API_Key string Debug bool } @@ -30,6 +31,7 @@ func (c *Config) parseConfig(configFile string) { viper.SetDefault("DB_Path", "./alkobote.db") viper.SetDefault("Debug", false) + viper.SetDefault("DisableURLShorter", false) // Name of the configuration file viper.SetConfigName("config") @@ -70,6 +72,7 @@ func (c *Config) setsConfig() { c.DBOptions = viper.GetString("DB_Options") c.DBPath = viper.GetString("DB_Path") c.Debug = viper.GetBool("Debug") + c.DisableURLShorter = viper.GetBool("DisableURLShorter") c.Polr_URL = viper.GetString("Polr_URL") c.Polr_API_Key = viper.GetString("Polr_API_Key") } |
