package gerror import "runtime" // stack represents a stack of program counters. type stack []uintptr func callers() *stack { const depth = 32 var pcs [depth]uintptr n := runtime.Callers(3, pcs[:]) var st stack = pcs[0:n] return &st }