diff --git a/util.go b/util.go index fe6cb45..46f923c 100644 --- a/util.go +++ b/util.go @@ -21,9 +21,9 @@ import ( "strings" "unicode" + "github.com/BurntSushi/toml" "github.com/hashicorp/hcl" "github.com/magiconair/properties" - toml "github.com/pelletier/go-toml" "github.com/spf13/cast" jww "github.com/spf13/jwalterweatherman" "gopkg.in/yaml.v2" @@ -155,14 +155,9 @@ func unmarshallConfigReader(in io.Reader, c map[string]interface{}, configType s } case "toml": - tree, err := toml.LoadReader(buf) - if err != nil { + if _, err := toml.Decode(buf.String(), &c); err != nil { return ConfigParseError{err} } - tmap := tree.ToMap() - for k, v := range tmap { - c[k] = v - } case "properties", "props", "prop": var p *properties.Properties