From d467309bdd1be55c84d9e48efd94d5cc2fe91c22 Mon Sep 17 00:00:00 2001 From: Thomas Pelletier Date: Wed, 9 Sep 2015 17:04:36 +0100 Subject: [PATCH] Add comment to justify this madness --- parser.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/parser.go b/parser.go index 5751632..0fe0457 100644 --- a/parser.go +++ b/parser.go @@ -312,6 +312,10 @@ func (p *tomlParser) parseArray() interface{} { } if follow.typ == tokenRightBracket { p.getToken() + // An array of TomlTrees is actually an array of inline + // tables, which is a shorthand for a table array. If the + // array was not converted from []interface{} to []*TomlTree, + // the two notations would not be equivalent. if arrayType == reflect.TypeOf(newTomlTree()) { tomlArray := make([]*TomlTree, len(array)) for i, v := range array {