--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The repository coreos/etcd is home to both binaries and libraries. It
vendors its dependencies, which is correct for its binaries, but
incorrect for its libraries.
Here is a modification of approach [4] that is bizarre at first glance
but I believe will work: the repository's binaries can vendor its own
libraries. That is,
cmd/main.go
cmd/vendor/golang.org/x/net/context
cmd/vendor/lib # copy of lib
lib/lib.go
Ugh, so I can't hack away in one repo?
--
You received this message because you are subscribed to a topic in the Google Groups "golang-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-dev/4FfTBfN2YaI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-dev+...@googlegroups.com.
This is a successor to a previous unresolved post on golang-dev[0]. I
originally posted my problem on golang-nuts[1].
Concretely, I can't implement an interface[2] from coreos/etcd in my
own library, because the interface includes a type that the repo
vendors, and it's impossible for me to create an instance of that
type, because the vendored package is inaccessible to me. Here[3] is a
self-contained demonstration of the problem.
--
...which is correct for its binaries, but
incorrect for its libraries.
Here is a modification of approach [4] that is bizarre at first glance
but I believe will work: the repository's binaries can vendor its own
libraries. That is,
cmd/main.go
cmd/vendor/golang.org/x/net/context
cmd/vendor/lib # copy of lib
lib/lib.go
At which point we shifted to augment our GOPATH when working within our source code tree:$ pwd/path/to/gopath/src/ourdomain.com/x$ echo $GOPATH/path/to/gopath/src/ourdomain.com/x/_vendor:/path/to/gopathWe're writing some tooling to handle the "vendoring" in the _vendor directory.For binaries which are publicly distributed, the vendor approach works well (and is the only option if you want things to be `go get`able, i.e. the GOPATH solution is not guaranteed to work)
On 9 Apr 2016 09:43, "Konstantin Shaposhnikov" <k.shapo...@gmail.com> wrote:
>
> I wonder if this approach with symlinks will work on Windows.
*sigh* this totally slipped my mind
At which point we shifted to augment our GOPATH when working within our source code tree:$ pwd/path/to/gopath/src/ourdomain.com/x$ echo $GOPATH/path/to/gopath/src/ourdomain.com/x/_vendor:/path/to/gopathWe're writing some tooling to handle the "vendoring" in the _vendor directory.