From fc27310d98659d53d02461d6a7352f021920c8e1 Mon Sep 17 00:00:00 2001 From: Rafe Colton Date: Mon, 12 May 2014 05:37:50 -0700 Subject: [PATCH] Loading config bytes manually instead of with `toml.DecodeFile` --- config/config.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 4eb6e1f47..41ccd5982 100644 --- a/config/config.go +++ b/config/config.go @@ -6,6 +6,7 @@ package config import ( "errors" "flag" + "io/ioutil" "net" "net/url" "path/filepath" @@ -86,7 +87,13 @@ func LoadConfig(path string) error { log.Warning("Skipping confd config file.") } else { log.Debug("Loading " + path) - _, err := toml.DecodeFile(path, &config) + + configBytes, err := ioutil.ReadFile(path) + if err != nil { + return err + } + + _, err = toml.Decode(string(configBytes), &config) if err != nil { return err }