callers mirrors the code in github.com/pkg/errors, but makes the depth customizable.
(depth int)
| 51 | // callers mirrors the code in github.com/pkg/errors, |
| 52 | // but makes the depth customizable. |
| 53 | func callers(depth int) *stack { |
| 54 | const numFrames = 32 |
| 55 | var pcs [numFrames]uintptr |
| 56 | n := runtime.Callers(2+depth, pcs[:]) |
| 57 | var st stack = pcs[0:n] |
| 58 | return &st |
| 59 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…