(out io.Writer, p *Palette, a *stack.Aggregated, pf pathFormat, needsEnv bool, filter, match *regexp.Regexp)
| 64 | } |
| 65 | |
| 66 | func writeBucketsToConsole(out io.Writer, p *Palette, a *stack.Aggregated, pf pathFormat, needsEnv bool, filter, match *regexp.Regexp) error { |
| 67 | if needsEnv { |
| 68 | _, _ = io.WriteString(out, "\nTo see all goroutines, visit https://github.com/maruel/panicparse#gotraceback\n\n") |
| 69 | } |
| 70 | srcLen, pkgLen := calcBucketsLengths(a, pf) |
| 71 | multi := len(a.Buckets) > 1 |
| 72 | for _, e := range a.Buckets { |
| 73 | header := p.BucketHeader(e, pf, multi) |
| 74 | if filter != nil && filter.MatchString(header) { |
| 75 | continue |
| 76 | } |
| 77 | if match != nil && !match.MatchString(header) { |
| 78 | continue |
| 79 | } |
| 80 | _, _ = io.WriteString(out, header) |
| 81 | _, _ = io.WriteString(out, p.StackLines(&e.Signature, srcLen, pkgLen, pf)) |
| 82 | } |
| 83 | return nil |
| 84 | } |
| 85 | |
| 86 | func writeGoroutinesToConsole(out io.Writer, p *Palette, s *stack.Snapshot, pf pathFormat, needsEnv bool, filter, match *regexp.Regexp) error { |
| 87 | if needsEnv { |
no test coverage detected
searching dependent graphs…