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.