Rename the folder node type from group to folder, freeing group for the draw option
This commit is contained in:
@@ -51,7 +51,7 @@ type namedNode struct {
|
||||
|
||||
func contained(n node) []namedNode {
|
||||
switch n := n.(type) {
|
||||
case *group:
|
||||
case *folder:
|
||||
return named(n.children)
|
||||
case *choice:
|
||||
out := make([]namedNode, len(n.items))
|
||||
@@ -69,7 +69,7 @@ func contained(n node) []namedNode {
|
||||
// named skips a bound {/path} key: it is a render edge, not containment, so using
|
||||
// it as a path segment would report a node under a path that does not reach it. Only
|
||||
// a template's fields hold bindings — loadDir skips a dot-prefixed entry, so a
|
||||
// group's children never carry the prefix — so this one skip serves both.
|
||||
// folder's children never carry the prefix — so this one skip serves both.
|
||||
func named(m map[string]node) []namedNode {
|
||||
out := make([]namedNode, 0, len(m))
|
||||
for _, name := range sortedNames(m) {
|
||||
@@ -111,7 +111,7 @@ func (e renderEdge) reached() string {
|
||||
|
||||
// renderEdges lists the children rendering n recurses into, mirroring expand: a
|
||||
// choice's items, and a template's field/reference tokens plus its operands. A
|
||||
// group renders nothing, so it has no edges.
|
||||
// folder renders nothing, so it has no edges.
|
||||
func renderEdges(n node) []renderEdge {
|
||||
switch n := n.(type) {
|
||||
case *choice:
|
||||
|
||||
Reference in New Issue
Block a user