| Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 Path : /opt/golang/1.22.0/src/cmd/go/testdata/mod/ |
| Current File : //opt/golang/1.22.0/src/cmd/go/testdata/mod/example.com_stack_v1.0.1.txt |
Module with a function that prints file name for the top stack frame.
Different versions of this module are identical, but they should return
different file names with -trimpath.
-- .mod --
module example.com/stack
go 1.14
-- .info --
{"Version":"v1.0.1"}
-- stack.go --
package stack
import "runtime"
func TopFile() string {
_, file, _, _ := runtime.Caller(0)
return file
}