FrameAt returns the stack frame at the specified index.
(i int)
| 194 | |
| 195 | // FrameAt returns the stack frame at the specified index. |
| 196 | func (s *Callstack) FrameAt(i int) Frame { |
| 197 | if i > len(*s)-1 { |
| 198 | return Frame{} |
| 199 | } |
| 200 | return (*s)[i] |
| 201 | } |
| 202 | |
| 203 | // Depth returns the number of frames in the call stack. |
| 204 | func (s *Callstack) Depth() int { return len(*s) } |