diff --git a/builder_go110.go b/builder_go110.go index 0b2b91a..9536dda 100644 --- a/builder_go110.go +++ b/builder_go110.go @@ -326,7 +326,12 @@ func buildTestMain(pkg *build.Package) ([]byte, bool, error) { return nil, false, err } contexts = ctxs - importPath = pkg.ImportPath + // @TODO: is it a good indicator for packages outside GOPATH + if strings.Index(pkg.ImportPath, "_/") == 0 { + importPath = pkg.Name + } else { + importPath = pkg.ImportPath + } name = pkg.Name }