getStack is an allocating wrapper around runtime.Callers.
(skip int, max int)
| 14 | |
| 15 | // getStack is an allocating wrapper around runtime.Callers. |
| 16 | func getStack(skip int, max int) []uintptr { |
| 17 | pcs := make([]uintptr, max) |
| 18 | return pcs[:runtime.Callers(skip+1, pcs)] |
| 19 | } |