Skip to content

Commit

Permalink
Merge pull request #61 from rafecolton/fix-for-handling-multiple-etcd…
Browse files Browse the repository at this point in the history
…-nodes-in-config

Loading config bytes manually instead of with `toml.DecodeFile`
  • Loading branch information
kelseyhightower committed May 12, 2014
2 parents a7c0c23 + fc27310 commit 6970fae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package config
import (
"errors"
"flag"
"io/ioutil"
"net"
"net/url"
"path/filepath"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 6970fae

Please sign in to comment.