You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The typical use of goop is to have a Goopfile (and .lock) at the root of a project. Running goop install creates a .vendor in the project directory wherever the Goopfiles are defined.
A pattern that I like, started by Ben Johnson, is having a cmd directory that is actually the main package of the project to create the cli binary. This is a good pattern because it encourages writing your project as a library that can be imported by others. As a simple example see: https://github.com/boltdb/boltd
Now when the current working directory is $GOPATH/src/github.com/boltdb/boltd/cmd/boltd .. and then running goop go build it would be nice for goop to go up the chain until it finds the first Goopfile/.lock/.vendor and use that namespace.
Hope that makes sense. Otherwise this means you have to run goop in the root of the project everytime, which is fine but this isn't clear. The downside of searching the children is when do you stop, in case someone forgets to have a Goopfile somewhere ... but, maybe that isn't so bad.
The text was updated successfully, but these errors were encountered:
pkieltyka
changed the title
goop command to search child paths for Goopfile / .vendor
goop command to search child paths for Goopfile / .vendor
Aug 8, 2014
The typical use of
goop
is to have a Goopfile (and .lock) at the root of a project. Runninggoop
install creates a.vendor
in the project directory wherever the Goopfiles are defined.A pattern that I like, started by Ben Johnson, is having a
cmd
directory that is actually themain
package of the project to create the cli binary. This is a good pattern because it encourages writing your project as a library that can be imported by others. As a simple example see: https://github.com/boltdb/boltdNow when the current working directory is $GOPATH/src/github.com/boltdb/boltd/cmd/boltd .. and then running
goop go build
it would be nice forgoop
to go up the chain until it finds the first Goopfile/.lock/.vendor and use that namespace.Hope that makes sense. Otherwise this means you have to run
goop
in the root of the project everytime, which is fine but this isn't clear. The downside of searching the children is when do you stop, in case someone forgets to have a Goopfile somewhere ... but, maybe that isn't so bad.The text was updated successfully, but these errors were encountered: