mirror of
https://github.com/safing/portbase
synced 2025-09-01 18:19:57 +00:00
Add testutils
This commit is contained in:
parent
9a05c0a66c
commit
0e2733a342
1 changed files with 8 additions and 0 deletions
8
utils/testutils/lines.go
Normal file
8
utils/testutils/lines.go
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
package testutils
|
||||||
|
|
||||||
|
import "runtime"
|
||||||
|
|
||||||
|
func GetLineNumberOfCaller(levels int) int {
|
||||||
|
_, _, line, _ := runtime.Caller(levels + 1)
|
||||||
|
return line
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue