diff --git a/threads.go b/threads.go index 1f49f75..5c2387f 100644 --- a/threads.go +++ b/threads.go @@ -119,6 +119,13 @@ func readFileGetSourceCode(path string) SourceCode { } func getLastPathIndexAndFunction(line string) (int, string) { + if strings.HasSuffix(line, ")") { + lastIndex := strings.LastIndex(line, "(") + if lastIndex != -1 { + line = line[:lastIndex] + } + } + lastIndex := strings.LastIndex(line, ".") function, _, _ := strings.Cut(line[lastIndex+1:], "(") return lastIndex, function