MCPcopy Index your code
hub / github.com/maruel/panicparse / writeBucketsToConsole

Function writeBucketsToConsole

internal/main.go:66–84  ·  view source on GitHub ↗
(out io.Writer, p *Palette, a *stack.Aggregated, pf pathFormat, needsEnv bool, filter, match *regexp.Regexp)

Source from the content-addressed store, hash-verified

64}
65
66func 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
86func writeGoroutinesToConsole(out io.Writer, p *Palette, s *stack.Snapshot, pf pathFormat, needsEnv bool, filter, match *regexp.Regexp) error {
87 if needsEnv {

Callers 1

processInnerFunction · 0.85

Calls 3

calcBucketsLengthsFunction · 0.85
BucketHeaderMethod · 0.80
StackLinesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…