allow decoding into slices that are empty
This commit is contained in:
parent
9ca9a4e1c3
commit
54464e89f1
@ -383,9 +383,7 @@ func (d *decoder) decodeSlice(name string, node ast.Node, result reflect.Value)
|
||||
items = []ast.Node{n}
|
||||
case *ast.ListType:
|
||||
items = n.List
|
||||
}
|
||||
|
||||
if items == nil {
|
||||
default:
|
||||
return fmt.Errorf("unknown slice type: %T", node)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user