Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion output.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,20 @@ func printOutput(
return false
}

var inIgnoreTypes = func(node *callgraph.Node) bool {
params := node.Func.Params
if len(params) == 0 || params[0] == nil {
return false
}

for _, ignored := range ignorePaths {
if params[0].Type().String() == ignored {
return true
}
}
return false
}

var isInter = func(edge *callgraph.Edge) bool {
//caller := edge.Caller
callee := edge.Callee
Expand Down Expand Up @@ -208,7 +222,8 @@ func printOutput(

// ignore path prefixes
if len(ignorePaths) > 0 &&
(inIgnores(caller) || inIgnores(callee)) {
(inIgnores(caller) || inIgnores(callee)) ||
inIgnoreTypes(caller) || inIgnoreTypes(callee) {
logf("IS ignored: %s -> %s", caller, callee)
return nil
}
Expand Down
Loading