From d8c5c0732fc1cb991e598a5fa4e1677033223a1f Mon Sep 17 00:00:00 2001 From: sawada_shinnosuke Date: Mon, 29 Aug 2016 11:03:20 +0900 Subject: [PATCH] supporting binary vendoring --- harness/reflect.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/harness/reflect.go b/harness/reflect.go index ded4b7d..088ddbf 100644 --- a/harness/reflect.go +++ b/harness/reflect.go @@ -774,6 +774,10 @@ func IsBuiltinType(name string) bool { } func importPathFromPath(root string) string { + vendoringPath := revel.BasePath + "/vendor/" + if strings.HasPrefix(root, vendoringPath) { + return filepath.ToSlash(root[len(vendoringPath):]) + } for _, gopath := range filepath.SplitList(build.Default.GOPATH) { srcPath := filepath.Join(gopath, "src") if strings.HasPrefix(root, srcPath) {