duanbimo7212 2016-09-28 15:30
浏览 118

供应的Go依赖项无法导入

A tale of two projects:

I wrote go-ios7crypt as a quick way to learn Go packaging. The dependencies are vendored using git submodules, and installation is as easy as go get github.com/mcandre/go-ios7crypt/...

Source: https://github.com/mcandre/go-ios7crypt

However, I tried to repeat this pattern for another project, a DuckDuckGo command line launcher. I'm curious what I've done wrong, as neither go get nor go build work when applying the same git submodule-based vendoring to the dependencies for ddg.

Trace:

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

(This silently fails to build the ddg binary.)

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

Also, the project fails to build from local sources:

> 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

Source: https://github.com/mcandre/mcandre/tree/master/go/ddg

Could the problem be that ddg is a nested project? For comparison, github.com/mcandre/blah/blah/blah is a collection of Go and non-Go projects, whereas github.com/mcandre/go-ios7crypt is a single Go project.

For what it's worth, I'm using Go 1.7 via gvm 1.0.0, with git 2.8.4, in PowerShell, on Windows 10 Professional x86_64.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 模型在y分布之外的数据上预测能力不好如何解决
    • ¥15 processing提取音乐节奏
    • ¥15 gg加速器加速游戏时,提示不是x86架构
    • ¥15 python按要求编写程序
    • ¥15 Python输入字符串转化为列表排序具体见图,严格按照输入
    • ¥20 XP系统在重新启动后进不去桌面,一直黑屏。
    • ¥15 opencv图像处理,需要四个处理结果图
    • ¥15 无线移动边缘计算系统中的系统模型
    • ¥15 深度学习中的画图问题
    • ¥15 java报错:使用mybatis plus查询一个只返回一条数据的sql,却报错返回了1000多条