rename Walker to Walkable interface

This commit is contained in:
z7zmey
2018-02-20 19:52:07 +02:00
parent a762ab3754
commit e3ed427fac
11 changed files with 24 additions and 24 deletions

View File

@@ -137,12 +137,12 @@ type visitorMock struct {
visitedKeys []string
}
func (v *visitorMock) EnterNode(n walker.Walker) bool { return v.visitChildren }
func (v *visitorMock) EnterNode(n walker.Walkable) bool { return v.visitChildren }
func (v *visitorMock) GetChildrenVisitor(key string) walker.Visitor {
v.visitedKeys = append(v.visitedKeys, key)
return &visitorMock{v.visitChildren, nil}
}
func (v *visitorMock) LeaveNode(n walker.Walker) {}
func (v *visitorMock) LeaveNode(n walker.Walkable) {}
func TestVisitorDisableChildren(t *testing.T) {
for _, tt := range nodesToTest {