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.
17 lines
235 B
17 lines
235 B
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
|
|
}
|
|
|