mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-21 14:45:02 +00:00
Merge pull request #66 from Warashi/improve/support-binary-vendoring
supporting binary vendoring
This commit is contained in:
@@ -774,6 +774,10 @@ func IsBuiltinType(name string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func importPathFromPath(root string) string {
|
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) {
|
for _, gopath := range filepath.SplitList(build.Default.GOPATH) {
|
||||||
srcPath := filepath.Join(gopath, "src")
|
srcPath := filepath.Join(gopath, "src")
|
||||||
if strings.HasPrefix(root, srcPath) {
|
if strings.HasPrefix(root, srcPath) {
|
||||||
|
|||||||
Reference in New Issue
Block a user