caller test

This commit is contained in:
Magnus Åhall 2023-09-26 08:50:57 +02:00
parent c73070d69a
commit 015167f4a3

2
pkg.go
View File

@ -22,7 +22,7 @@ var (
) )
func init() { func init() {
_, file, _, _ := runtime.Caller(1) _, file, _, _ := runtime.Caller(2)
fmt.Printf("--\nWRAPPED_ERROR: %s\n--\n", file) fmt.Printf("--\nWRAPPED_ERROR: %s\n--\n", file)
dir := path.Dir(file) dir := path.Dir(file)
dirBase := path.Dir(dir) dirBase := path.Dir(dir)