common/testing_common.go: Bugfix for package-path finder

This commit is contained in:
Dustin Oprea 2020-06-02 15:01:01 -04:00
parent c23f7a1066
commit 77cb76cd34

View File

@ -28,14 +28,14 @@ var (
// tests. // tests.
func GetModuleRootPath() string { func GetModuleRootPath() string {
p, err := build.Default.Import( p, err := build.Default.Import(
"github.com/dsoprea/go-exif/v2", "github.com/dsoprea/go-exif",
build.Default.GOPATH, build.Default.GOPATH,
build.FindOnly) build.FindOnly)
log.PanicIf(err) log.PanicIf(err)
packagePath := p.Dir packagePath := p.Dir
return packagePath return path.Join(packagePath, "v2")
} }
func getTestAssetsPath() string { func getTestAssetsPath() string {