Standard library / runtime
runtime.Func
Represents compiled function metadata obtained from runtime lookup, not a callable function value. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
type Func struct {}Working Example
Example Snippetgo
package main
import ( "fmt" "runtime")
func main() { pc, _, _, _ := runtime.Caller(0) var f *runtime.Func = runtime.FuncForPC(pc) fmt.Println(f != nil)}