Standard library / runtime

runtime.Frames

Iterates symbolized call frames from CallersFrames. Do not construct it manually from arbitrary addresses. Expected stdout: 'true\n'.

Formal Syntax & Structure

go syntaxgo
type Frames struct {}

Working Example

Example Snippetgo
package main
import (  "fmt"  "runtime")
func main() {  pcs := make([]uintptr, 16)  n := runtime.Callers(1, pcs)  var f *runtime.Frames = runtime.CallersFrames(pcs[:n])  fmt.Println(f != nil)}
Go Reference