diff options
author | Kevin Chabowski <kevin@kch42.de> | 2013-09-14 22:37:06 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2013-09-14 22:37:06 +0200 |
commit | c0a06609919d09fbcb6326ff69cc455dd13506ef (patch) | |
tree | 7a56a337f9ac3b9b3fc099ea846fd884112469b7 /mails.go | |
parent | 33c32f1e026482d60de635656a53de723114fcb7 (diff) | |
download | mailremind-c0a06609919d09fbcb6326ff69cc455dd13506ef.tar.gz mailremind-c0a06609919d09fbcb6326ff69cc455dd13506ef.tar.bz2 mailremind-c0a06609919d09fbcb6326ff69cc455dd13506ef.zip |
Reduced duplicate code for config reading.
Diffstat (limited to 'mails.go')
-rw-r--r-- | mails.go | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -3,6 +3,7 @@ package main import ( "bytes" "fmt" + "kch42.de/gostuff/mailremind/confhelper" "kch42.de/gostuff/mailremind/model" "log" "path" @@ -24,10 +25,7 @@ var ( ) func initMails() { - tplroot, err := conf.GetString("paths", "mailtpls") - if err != nil { - log.Fatalf("Could not get paths.mailtpls from config: %s", err) - } + tplroot := confhelper.ConfStringOrFatal(conf, "paths", "mailtpls") mailActivationcode = loadMailTpl(tplroot, "activationcode") mailPwreset = loadMailTpl(tplroot, "pwreset") |