Compare commits
No commits in common. "ecff1d33bb2276dee4a40b7596178b80b4877c53" and "c777bd25b06ab99791e0b001ec64e879d7c6c569" have entirely different histories.
ecff1d33bb
...
c777bd25b0
12
finder.go
12
finder.go
|
@ -34,18 +34,6 @@ func find(code string) ([]string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ignored, deps := get_ignored_and_deps(code)
|
ignored, deps := get_ignored_and_deps(code)
|
||||||
|
|
||||||
// 1. find function declarations
|
|
||||||
syntax.Walk(f, func(node syntax.Node) bool {
|
|
||||||
switch x := node.(type) {
|
|
||||||
case *syntax.FuncDecl:
|
|
||||||
ignored = append(ignored, x.Name.Value)
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
})
|
|
||||||
|
|
||||||
// 2. collect all commands
|
|
||||||
syntax.Walk(f, func(node syntax.Node) bool {
|
syntax.Walk(f, func(node syntax.Node) bool {
|
||||||
switch x := node.(type) {
|
switch x := node.(type) {
|
||||||
case *syntax.CallExpr:
|
case *syntax.CallExpr:
|
||||||
|
|
Loading…
Reference in New Issue