MCPcopy
hub / github.com/expr-lang/expr / Find

Function Find

ast/find.go:3–7  ·  view source on GitHub ↗
(node Node, fn func(node Node) bool)

Source from the content-addressed store, hash-verified

1package ast
2
3func Find(node Node, fn func(node Node) bool) Node {
4 v := &finder{fn: fn}
5 Walk(&node, v)
6 return v.node
7}
8
9type finder struct {
10 node Node

Callers 2

TestFindFunction · 0.92
VisitMethod · 0.85

Calls 1

WalkFunction · 0.85

Tested by 1

TestFindFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…