vendor doesn't work as expected #18612

Closed
caibirdme opened this Issue Jan 11, 2017 · 1 comment

Projects

None yet

2 participants

@caibirdme

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.6.2

What operating system and processor architecture are you using (go env)?

darwin amd64

What did you do?

I have two GOPATH: pA and pB
In pA I have a project called Foo which looks like:

src/
    foo/
        main.go
        vendor/
            github.com/
                  bar/
                     bar.go

And the pB:

src/
    baz/
        qq/
            qq.go

in the pA/src/foo/main.go:

import "baz/qq"

And in pB/src/baz/qq/qq.go:

import "github.com/bar"

When I cd pA/src/foo && go build there was an error which said it couldn't find the package github.com/bar in $GOROOT,$GOPATH.But the fact is that it laid in the vendor directory.

What did you expect to see?

go build successfully

What did you see instead?

go build error

@kardianos
Contributor

This is working as expected.
For questions see https://github.com/golang/go/wiki/Questions .

@kardianos kardianos closed this Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment