aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-02-20 11:28:43 -0800
committerAdam Mathes <adam@trenchant.org>2017-02-20 11:28:43 -0800
commit63923e5de3fea586f892602e6d4b74a49bcc6940 (patch)
treebb5eb2c7452ff51f518e96b980fc6914fff69cf7 /config
parent38a504c2afecb5ec76358a16a03a6cf0a61d0b84 (diff)
downloadneko-63923e5de3fea586f892602e6d4b74a49bcc6940.tar.gz
neko-63923e5de3fea586f892602e6d4b74a49bcc6940.tar.bz2
neko-63923e5de3fea586f892602e6d4b74a49bcc6940.zip
switch to single binary (neko) with standard flags. update config file to use nicer names
Diffstat (limited to 'config')
-rw-r--r--config/config.go15
1 files changed, 7 insertions, 8 deletions
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)
}
}