From 0b53e083dcbbd55ddff062be234a352a03b1f0fa Mon Sep 17 00:00:00 2001 From: Chen-I Lim Date: Tue, 13 Oct 2020 22:14:08 -0700 Subject: [PATCH] Add mapstructure for dbconfig in config.go --- server/main/config.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/main/config.go b/server/main/config.go index e851f4446..b7ab3f2f4 100644 --- a/server/main/config.go +++ b/server/main/config.go @@ -8,13 +8,13 @@ import ( // Configuration is the app configuration stored in a json file type Configuration struct { - ServerRoot string `json:"serverRoot"` - Port int `json:"port"` - DBType string `json:"dbtype"` - DBConfigString string `json:"dbconfig"` - UseSSL bool `json:"useSSL"` - WebPath string `json:"webpath"` - FilesPath string `json:"filespath"` + ServerRoot string `json:"serverRoot" mapstructure:"serverRoot"` + Port int `json:"port" mapstructure:"port"` + DBType string `json:"dbtype" mapstructure:"dbtype"` + DBConfigString string `json:"dbconfig" mapstructure:"dbconfig"` + UseSSL bool `json:"useSSL" mapstructure:"useSSL"` + WebPath string `json:"webpath" mapstructure:"webpath"` + FilesPath string `json:"filespath" mapstructure:"filespath"` } func readConfigFile() (*Configuration, error) {