MCPcopy Index your code
hub / github.com/pkg/errors / stackTrace

Function stackTrace

stack_test.go:171–177  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169}
170
171func stackTrace() StackTrace {
172 const depth = 8
173 var pcs [depth]uintptr
174 n := runtime.Callers(1, pcs[:])
175 var st stack = pcs[0:n]
176 return st.StackTrace()
177}
178
179func TestStackTraceFormat(t *testing.T) {
180 tests := []struct {

Callers 1

TestStackTraceFormatFunction · 0.85

Calls 1

StackTraceMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…