return *stack instead of stack
Author: simon28082Created Mar 9, 2021Updated Nov 19, 2021
Hi, I see that the callers in the source code return *stack instead of stack. Why does this happen?
func callers() *stack {
const depth = 32
var pcs [depth]uintptr
n := runtime.Callers(3, pcs[:])
var st stack = pcs[0:n]
return &st
}Source: pkg/errors