By "has a vendor folder in it's root dir" do you mean 
/workspace/specific/project/vendor? 
If so, go didn't find it because that directory is outside of 
/workspace/specific/project/src/, and thus not seen as source files in the 
GOPATH. It works when the project is under /go because the vendor directory 
is below /go/src/.

On Friday, July 14, 2017 at 5:11:14 AM UTC+2, ganglin song wrote:
>
>
> In ~/.bash_profile , has a GOPATH Like this :
>
> export GOPATH=/go
>
>
>
> In the specific project ( *Not In GOPATH folder *), has a .env file Like 
> this:
>
>
> export GOPATH=`pwd`:$GOPATH
>  
>
> this .env file  makes current dir as a GOPTAH.
>
> After exec `source .env `, GOPATH becomes to this:
>
>
> go env
>
> ....
> GOPATH=*/workspace/specific/project/*:/go
> ....
>
>  
>
> Now , If this specific project has a vendor folder in it`s root dir , go 
> *cant`t 
> *detect the packages in this vendor folder.
>
> if move the whole project into the GOPATH (* /go , not the `pwd` *), go* 
> can *recognize packages in vendor folder.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to