-
Notifications
You must be signed in to change notification settings - Fork 149
How to distinguish between a go and gb project? #93
Comments
Sorry for the brief reply, mobile. The project directory is ~/foo/, not ~/foo/src/. The project detection rule On Fri, 15 May 2015 08:12 Fatih Arslan notifications@github.com wrote:
|
Totally right, I've fixed the paths. The questions are still valid. |
I'll take a look when I get home. On Fri, 15 May 2015 09:04 Fatih Arslan notifications@github.com wrote:
|
Relates issue #53. |
I believe that |
Say we have our code inside a
src
folder:Our root folder is:
Can we say that this is a gb project if all or some of followings are true:
$GB_PROJECT_DIR
is equal to~/foo
$GOPATH
is not equal to~/foo
vendor
folder in the form of:~/foo/src/vendor
(I'm not sure about this though,there might be a source code that doesn't have any kind of vendorized code, thus notvendor
folder at all)I have a function to find out the root project folder of a given go file, however I need to be sure I'm dealing with a
gb
project. Because it might be also a file inside a$GOPATH
.This clarifications are needed so I can make
godef
and many other tools automatically play nice withgb
project. For examplegodef
should jump to the vendored file inside the$PROJECT
instead of to a file inside$GOPATH
In the docs it says:
A gb project is a folder on disk that contains a sub directory named src/
. This explanation is also true for any$GOPATH
go project.The text was updated successfully, but these errors were encountered: