From abafbf243b9583ac1360ae4ef680d8acaa361089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 5 Aug 2016 11:20:27 +0200 Subject: [PATCH] Revert "Handle TOML Library Licensing" It breaks Hugo, will have to test/investigate. Erro when building Hugo docs: ``` ERROR: 2016/08/05 11:19:23 site.go:1208: unable to process menus in site config ERROR: 2016/08/05 11:19:23 site.go:1209: Unable to Cast map[string]interface {}{"pre":"", "weight":-20, "url":"/commands/", "name":"Hugo Cmd Reference", "identifier":"commands"} of type map[string]interface {} to []interface{} ``` This reverts commit 7402856f06d639275f36058cd60fb1d8a10d2a52. --- util.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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