add new integration test pattern

This commit is contained in:
Jesse Duffield 2022-08-07 22:09:39 +10:00
parent c7f9d5801b
commit 77881a9c7d
154 changed files with 1514 additions and 670 deletions

View file

@ -128,3 +128,10 @@ func StackTrace() string {
n := runtime.Stack(buf, false)
return fmt.Sprintf("%s\n", buf[:n])
}
// returns the path of the file that calls the function.
// 'skip' is the number of stack frames to skip.
func FilePath(skip int) string {
_, path, _, _ := runtime.Caller(skip)
return path
}