From 62174f7c84a6224a50b43438ce09b461233f7d8e Mon Sep 17 00:00:00 2001 From: horus Date: Wed, 14 Feb 2018 18:30:49 +0100 Subject: Changes config params. --- crawler/config.go | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'crawler/config.go') diff --git a/crawler/config.go b/crawler/config.go index f05ad18..af02a6c 100644 --- a/crawler/config.go +++ b/crawler/config.go @@ -6,14 +6,16 @@ import ( ) type Config struct { - DBDriver string - DBDBName string - DBHost string - DBPort string - DBUser string - DBPassword string - DBOptions string - DBPath string // for sqlite + 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 Debug bool } @@ -64,13 +66,13 @@ func (c *Config) parseConfig(configFile string) { // Actually sets the config struct func (c *Config) setsConfig() { - c.DBDriver = viper.GetString("DBDriver") - c.DBHost = viper.GetString("DBHost") - c.DBPort = viper.GetString("DBPort") - c.DBUser = viper.GetString("DBUser") - c.DBPassword = viper.GetString("DBPassword") - c.DBDBName = viper.GetString("DBName") - c.DBOptions = viper.GetString("DBOptions") - c.DBPath = viper.GetString("DBPath") + c.DBDriver = viper.GetString("DB_Driver") + c.DBHost = viper.GetString("DB_Host") + c.DBPort = viper.GetString("DB_Port") + c.DBUser = viper.GetString("DB_User") + c.DBPassword = viper.GetString("DB_Password") + c.DBDBName = viper.GetString("DB_Name") + c.DBOptions = viper.GetString("DB_Options") + c.DBPath = viper.GetString("DB_Path") c.Debug = viper.GetBool("Debug") } -- cgit v1.2.3