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

proposal: cmd/go: make 'go get' recurse by default #23987

Closed
mcandre opened this issue Feb 21, 2018 · 4 comments
Closed

proposal: cmd/go: make 'go get' recurse by default #23987

mcandre opened this issue Feb 21, 2018 · 4 comments

Comments

@mcandre
Copy link

mcandre commented Feb 21, 2018

When a project features main-package applications in cmd directories, have go get automatically recurse from the top-level repository down into each cmd descendant and go install these nodes as well.

The current way to force this is to explicitly append /... to the URL for go get. Would be more convenient and consistent to do this by default.

@dominikh
Copy link
Member

Would be more convenient and consistent to do this by default

More consistent with what?

@mvdan
Copy link
Member

mvdan commented Feb 21, 2018

The Go tools don't treat cmd directories or sub-packages differently at all, currently. I would see such a change as inconsistent, if anything.

@mcandre
Copy link
Author

mcandre commented Feb 21, 2018

The inconsistency is not between directories so much as between library code vs. application code. go get with a top-level repository path obtains all the code necessary for importing code, but neglects to install any Go applications. This omission doesn't happen in other languages, where gem install, cabal install, npm install are sure to setup source code as well as applications during installation.

@bradfitz bradfitz changed the title go get: recurse by default proposal: cmd/go: make 'go get' recurse by default Feb 21, 2018
@gopherbot gopherbot added this to the Proposal milestone Feb 21, 2018
@rsc
Copy link
Contributor

rsc commented Feb 26, 2018

Sorry, but please type /....

@rsc rsc closed this as completed Feb 26, 2018
@golang golang locked and limited conversation to collaborators Feb 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants