aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-01-24 23:43:28 +0000
committerNiall Sheridan <nsheridan@gmail.com>2017-01-25 00:02:37 +0000
commitf635033e3e953e74d67b76a520c9760786330af5 (patch)
tree8e41d7d07c489edbfb45f1d4ffff921b2f6bc265 /cmd
parent0f4344348419ed6c3ee4236188e456d79e2d51b4 (diff)
Switch to scl, an extension of hcl
Diffstat (limited to 'cmd')
-rw-r--r--cmd/cashierd/main.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/cmd/cashierd/main.go b/cmd/cashierd/main.go
index fc03171..95cf194 100644
--- a/cmd/cashierd/main.go
+++ b/cmd/cashierd/main.go
@@ -292,15 +292,6 @@ func newState() string {
return hex.EncodeToString(k)
}
-func readConfig(filename string) (*config.Config, error) {
- f, err := os.Open(filename)
- if err != nil {
- return nil, errors.Wrap(err, "failed to parse config file")
- }
- defer f.Close()
- return config.ReadConfig(f)
-}
-
func loadCerts(certFile, keyFile string) (tls.Certificate, error) {
key, err := wkfs.ReadFile(keyFile)
if err != nil {
@@ -316,7 +307,7 @@ func loadCerts(certFile, keyFile string) (tls.Certificate, error) {
func main() {
// Privileged section
flag.Parse()
- conf, err := readConfig(*cfg)
+ conf, err := config.ReadConfig(*cfg)
if err != nil {
log.Fatal(err)
}