MCPcopy
hub / github.com/uber-go/goleak / getStacks

Function getStacks

internal/stack/stacks.go:83–93  ·  view source on GitHub ↗
(all bool)

Source from the content-addressed store, hash-verified

81}
82
83func getStacks(all bool) []Stack {
84 trace := getStackBuffer(all)
85 stacks, err := newStackParser(bytes.NewReader(trace)).Parse()
86 if err != nil {
87 // Well-formed stack traces should never fail to parse.
88 // If they do, it's a bug in this package.
89 // Panic so we can fix it.
90 panic(fmt.Sprintf("Failed to parse stack trace: %v\n%s", err, trace))
91 }
92 return stacks
93}
94
95type stackParser struct {
96 scan *scanner

Callers 2

AllFunction · 0.85
CurrentFunction · 0.85

Calls 3

newStackParserFunction · 0.85
ParseMethod · 0.80
getStackBufferFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…