You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
235 B
18 lines
235 B
4 years ago
|
package test
|
||
|
|
||
|
import (
|
||
|
"path/filepath"
|
||
|
"runtime"
|
||
|
)
|
||
|
|
||
|
func FixturePath(file string) string {
|
||
|
path := "fixture/"
|
||
|
|
||
|
_, filename, _, ok := runtime.Caller(0)
|
||
|
if ok {
|
||
|
path = filepath.Dir(filename) + "/" + path
|
||
|
}
|
||
|
|
||
|
return path + file
|
||
|
}
|