(st string)
| 75 | } |
| 76 | |
| 77 | func getOneLineSourceFromPrintedStack(st string) (file string, line int, fn string, ok bool) { |
| 78 | // We only need 3 lines: the function/file/line info will be on the first two lines. |
| 79 | // See parsePrintedStack() for details. |
| 80 | lines := strings.SplitN(strings.TrimSpace(st), "\n", 3) |
| 81 | if len(lines) > 0 { |
| 82 | _, file, line, fnName := parsePrintedStackEntry(lines, 0) |
| 83 | if fnName != "unknown" { |
| 84 | _, fn = functionName(fnName) |
| 85 | } |
| 86 | return filepath.Base(file), line, fn, true |
| 87 | } |
| 88 | return "", 0, "", false |
| 89 | } |
no test coverage detected
searching dependent graphs…