// Caller reports file and line number information about function invocations on // the calling goroutine's stack. The argument skip is the number of stack frames // to ascend, with 0 identifying the caller of Caller. (For historical reasons the // meaning of skip differs between Caller and [Callers].) The return values report // the program counter, the file name (using forward slashes as path separator, even // on Windows), and the line number within the file of the corresponding call. // The boolean ok is false if it was not possible to recover the information. func Caller(skip int) (pc uintptr, file string, line int, ok bool) { … } // Callers fills the slice pc with the return program counters of function invocations // on the calling goroutine's stack. The argument skip is the number of stack frames // to skip before recording in pc, with 0 identifying the frame for Callers itself and // 1 identifying the caller of Callers. // It returns the number of entries written to pc. // // To translate these PCs into symbolic information such as function // names and line numbers, use [CallersFrames]. CallersFrames accounts // for inlined functions and adjusts the return program counters into // call program counters. Iterating over the returned slice of PCs // directly is discouraged, as is using [FuncForPC] on any of the // returned PCs, since these cannot account for inlining or return // program counter adjustment. func Callers(skip int, pc []uintptr) int { … } var defaultGOROOT … // GOROOT returns the root of the Go tree. It uses the // GOROOT environment variable, if set at process start, // or else the root used during the Go build. // // Deprecated: The root used during the Go build will not be // meaningful if the binary is copied to another machine. // Use the system path to locate the “go” binary, and use // “go env GOROOT” to find its GOROOT. func GOROOT() string { … } var buildVersion … // Version returns the Go tree's version string. // It is either the commit hash and date at the time of the build or, // when possible, a release tag like "go1.3". func Version() string { … } const GOOS … const GOARCH …