Rewrap checkNoCycles' doc

This commit is contained in:
2026-09-30 21:58:08 +02:00
committed by Lillem4n
parent a9448d1a99
commit 5cb919eb3c
+3 -2
View File
@@ -193,8 +193,9 @@ func repeatCheck(path string, n node, mem renderCounts) error {
// checkNoCycles rejects a reference cycle: a node whose rendering can reach itself // checkNoCycles rejects a reference cycle: a node whose rendering can reach itself
// — directly, mutually, or through a chain — never terminates, so it must fail at // — directly, mutually, or through a chain — never terminates, so it must fail at
// New rather than stack-overflow at render. It is a depth-first walk of the render // New rather than stack-overflow at render. It is a depth-first walk of the render
// graph (renderEdges). Every node is a root: a field its parent's format never renders is still reachable // graph (renderEdges). Every node is a root: a field its parent's format never
// by dot path, so a cycle in one would otherwise reach render and be fatal there. // renders is still reachable by dot path, so a cycle in one would otherwise reach
// render and be fatal there.
func checkNoCycles(root map[string]node) error { func checkNoCycles(root map[string]node) error {
const ( const (
grey = 1 grey = 1