miniwalker: add interface assertion (noop)
This commit is contained in:
parent
8986937340
commit
94fe16f681
@ -34,6 +34,8 @@ func (mw *miniWalker) LeaveChildNode(key string, w walker.Walkable) {}
|
|||||||
func (mw *miniWalker) EnterChildList(key string, w walker.Walkable) {}
|
func (mw *miniWalker) EnterChildList(key string, w walker.Walkable) {}
|
||||||
func (mw *miniWalker) LeaveChildList(key string, w walker.Walkable) {}
|
func (mw *miniWalker) LeaveChildList(key string, w walker.Walkable) {}
|
||||||
|
|
||||||
|
var _ walker.Visitor = &miniWalker{} // interface assertion
|
||||||
|
|
||||||
func walk(n node.Node, cb func(node.Node) error) error {
|
func walk(n node.Node, cb func(node.Node) error) error {
|
||||||
mw := miniWalker{cb: cb}
|
mw := miniWalker{cb: cb}
|
||||||
n.Walk(&mw)
|
n.Walk(&mw)
|
||||||
|
Loading…
Reference in New Issue
Block a user