Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goop command to search child paths for Goopfile / .vendor #22

Open
pkieltyka opened this issue Aug 8, 2014 · 0 comments
Open

goop command to search child paths for Goopfile / .vendor #22

pkieltyka opened this issue Aug 8, 2014 · 0 comments

Comments

@pkieltyka
Copy link

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.

@pkieltyka 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant