Skip to content

Commit dbd7055

Browse files
MrDiennsantonmedv
authored andcommitted
fixed visitor usage example as it had compilation errors
1 parent 40ac5c9 commit dbd7055

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/Usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ type visitor struct {
201201

202202
func (v *visitor) Enter(node *ast.Node) {}
203203
func (v *visitor) Exit(node *ast.Node) {
204-
if v, ok := node.(*ast.IdentifierNode); ok {
205-
v.identifiers = append(v.identifiers, node.Value)
204+
if n, ok := (*node).(*ast.IdentifierNode); ok {
205+
v.identifiers = append(v.identifiers, n.Value)
206206
}
207207
}
208208

0 commit comments

Comments
 (0)