From 63923e5de3fea586f892602e6d4b74a49bcc6940 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Mon, 20 Feb 2017 11:28:43 -0800 Subject: switch to single binary (neko) with standard flags. update config file to use nicer names --- config/config.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'config') diff --git a/config/config.go b/config/config.go index 59baa2b..bcd1d27 100644 --- a/config/config.go +++ b/config/config.go @@ -7,11 +7,11 @@ import ( ) type Settings struct { - DBServer string - WebServer string - Username string - Realm string - DigestPassword string + DBServer string `json:"db"` + WebServer string `json:"web"` + Username string `json:"username"` + DigestPassword string `json:"password"` + StaticDir string `json:"static_dir"` } var Config Settings @@ -19,11 +19,10 @@ var Config Settings func Read(filename string) { file, e := ioutil.ReadFile(filename) if e != nil { - log.Fatal("Can not read config file", e) + log.Fatal("Can not read config file\n", e) } - e = json.Unmarshal(file, &Config) if e != nil { - log.Fatal("Config read error", e) + log.Fatal("Config read error\n", e) } } -- cgit v1.2.3