Rewrap checkNoCycles' doc
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user