Split walkPath's four modes into walkers of their own, sharing how a path steps
This commit is contained in:
+1
-1
@@ -100,7 +100,7 @@ func operandReader(t *template, head string) string {
|
||||
// coverPath collects what holding one path pins: every choice level the path
|
||||
// passes through, whole, and the leaf it renders.
|
||||
func coverPath(n node, tail []string, into map[node]bool) {
|
||||
_, _ = walkPath(n, tail, pathWalk{mode: walkCover, leaf: func(n node) error { cover(n, into, false); return nil }})
|
||||
_, _ = (&coverWalk{into: into}).walk(n, tail)
|
||||
}
|
||||
|
||||
// cover collects a level and everything contained in it. A fixed string outside a
|
||||
|
||||
Reference in New Issue
Block a user