summary refs log tree commit diff stats
path: root/init.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-13 03:52:15 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-13 03:52:15 -0400
commitf06a2d6126bed22d38b506e1edc8822386a7cc33 (patch)
tree282cb6924e3fa48fa457534f44efae0a256c697f /init.go
parentb42a3d0d66712b8da71e6f7984b3cf16d3e304fc (diff)
downloadgetwtxt-f06a2d6126bed22d38b506e1edc8822386a7cc33.tar.gz
fixed viper config parsing resulting in build errors
Diffstat (limited to 'init.go')
-rw-r--r--init.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/init.go b/init.go
index 2069ceb..f871a72 100644
--- a/init.go
+++ b/init.go
@@ -73,8 +73,11 @@ func initConfig() {
 
 	confObj.port = viper.GetInt("port")
 	confObj.logfile = viper.GetString("logfile")
-	confObj.twtxtfile = viper.GetString("twtxtfile")
 	confObj.stdoutLogging = viper.GetBool("stdoutLogging")
+	confObj.instance.name = viper.GetString("instance.name")
+	confObj.instance.url = viper.GetString("instance.url")
+	confObj.instance.owner = viper.GetString("instance.owner")
+	confObj.instance.mail = viper.GetString("instance.mail")
 }
 
 func initLogging() {
@@ -117,8 +120,11 @@ func rebindConfig() {
 	// reassign values to the config object
 	confObj.port = viper.GetInt("port")
 	confObj.logfile = viper.GetString("logfile")
-	confObj.twtxtfile = viper.GetString("twtxtfile")
 	confObj.stdoutLogging = viper.GetBool("stdoutLogging")
+	confObj.instance.name = viper.GetString("instance.name")
+	confObj.instance.url = viper.GetString("instance.url")
+	confObj.instance.owner = viper.GetString("instance.owner")
+	confObj.instance.mail = viper.GetString("instance.mail")
 
 	// reinitialize logging
 	initLogging()