caller test

This commit is contained in:
Magnus Åhall 2023-09-26 08:47:12 +02:00
parent e1b81c9e2c
commit c63cd5fb0e

1
pkg.go
View File

@ -23,6 +23,7 @@ var (
func init() { func init() {
_, file, _, _ := runtime.Caller(0) _, file, _, _ := runtime.Caller(0)
fmt.Printf("--\nWRAPPED_ERROR: %s\n--\n", file)
dir := path.Dir(file) dir := path.Dir(file)
dirBase := path.Dir(dir) dirBase := path.Dir(dir)
baseDirLength = len(dirBase) baseDirLength = len(dirBase)