package main import ( "fmt" "github.com/gogf/gf/debug/gdebug" ) func main() { gdebug.PrintStack() fmt.Println(gdebug.CallerPackage()) fmt.Println(gdebug.CallerFunction()) }