Vendored Go依赖项无法导入

时间:2016-09-28 15:30:50

标签: go import vendor

两个项目的故事:

我写了go-ios7crypt作为学习Go包装的快捷方式。依赖项是使用git子模块销售的,安装就像go get github.com/mcandre/go-ios7crypt/...

一样简单

来源:https://github.com/mcandre/go-ios7crypt

但是,我试图为另一个项目,DuckDuckGo命令行启动器重复此模式。我很好奇我做错了什么,因为在将相同的基于git子模块的销售应用于ddg的依赖项时,go getgo build都不起作用。

跟踪:

> go get github.com/mcandre/mcandre/go/ddg/...

(这无法构建ddg二进制文件。)

> where.exe ddg
INFO: Could not find files for the given pattern(s).

此外,该项目无法从当地来源构建:

> go build
main.go:4:2: cannot find package "github.com/skratchdot/open-golang/open" in any of:
        C:\tools\go1.7\src\github.com\skratchdot\open-golang\open (from $GOROOT)
        C:\Users\andrew\go\src\github.com\skratchdot\open-golang\open (from $GOPATH)

> echo $env:GOPATH
C:\Users\andrew\go

来源:https://github.com/mcandre/mcandre/tree/master/go/ddg

问题可能是ddg是一个嵌套项目吗?为了比较,github.com/mcandre/blah/blah/blah是Go和非Go项目的集合,而github.com/mcandre/go-ios7crypt是一个Go项目。

对于它的价值,我在Windows 10 Professional x86_64上使用Go 1.7通过gvm 1.0.0,使用git 2.8.4,在PowerShell中使用。

0 个答案:

没有答案