Make renderEdges panic on a node kind it does not handle, and drop the done round item

This commit is contained in:
2026-09-28 23:58:14 +02:00
committed by Lillem4n
parent 446a3f98d6
commit d19c5d4719
3 changed files with 5 additions and 5 deletions
+4 -2
View File
@@ -114,7 +114,7 @@ func (e renderEdge) reached() string {
return "{" + e.label + "}"
}
// renderEdges lists the children rendering n recurses into, mirroring expand: a
// renderEdges lists the children rendering n recurses into, mirroring render: a
// choice's items, and a template's field/reference tokens plus its operands. A
// folder renders nothing, so it has no edges.
func renderEdges(n node) []renderEdge {
@@ -155,8 +155,10 @@ func renderEdges(n node) []renderEdge {
es = append(es, renderEdge{to: c.node, label: n.t.header[n.i]})
}
return es
default:
case *folder, *nullItem:
return nil
default:
panic(fmt.Sprintf("fejkdata: renderEdges has no case for node %T", n))
}
}