MCPcopy Create free account
hub / github.com/maruel/panicparse / BucketHeader

Method BucketHeader

internal/ui.go:162–178  ·  view source on GitHub ↗

BucketHeader prints the header of a goroutine signature.

(b *stack.Bucket, pf pathFormat, multipleBuckets bool)

Source from the content-addressed store, hash-verified

160
161// BucketHeader prints the header of a goroutine signature.
162func (p *Palette) BucketHeader(b *stack.Bucket, pf pathFormat, multipleBuckets bool) string {
163 extra := ""
164 if s := b.SleepString(); s != "" {
165 extra += " [" + s + "]"
166 }
167 if b.Locked {
168 extra += " [locked]"
169 }
170 if c := pf.createdByString(&b.Signature); c != "" {
171 extra += p.CreatedBy + " [Created by " + c + "]"
172 }
173 return fmt.Sprintf(
174 "%s%d: %s%s%s\n",
175 p.routineColor(b.First, multipleBuckets), len(b.IDs),
176 b.State, extra,
177 p.EOLReset)
178}
179
180// GoroutineHeader prints the header of a goroutine.
181func (p *Palette) GoroutineHeader(g *stack.Goroutine, pf pathFormat, multipleGoroutines bool) string {

Callers 2

TestBucketHeaderFunction · 0.80
writeBucketsToConsoleFunction · 0.80

Calls 3

routineColorMethod · 0.95
SleepStringMethod · 0.80
createdByStringMethod · 0.80

Tested by 1

TestBucketHeaderFunction · 0.64