Add comment to justify this madness
This commit is contained in:
@@ -312,6 +312,10 @@ func (p *tomlParser) parseArray() interface{} {
|
|||||||
}
|
}
|
||||||
if follow.typ == tokenRightBracket {
|
if follow.typ == tokenRightBracket {
|
||||||
p.getToken()
|
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()) {
|
if arrayType == reflect.TypeOf(newTomlTree()) {
|
||||||
tomlArray := make([]*TomlTree, len(array))
|
tomlArray := make([]*TomlTree, len(array))
|
||||||
for i, v := range array {
|
for i, v := range array {
|
||||||
|
|||||||
Reference in New Issue
Block a user