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

cmd/go: Add support for go get {tarball URL} #14076

Closed
mappu opened this issue Jan 23, 2016 · 1 comment
Closed

cmd/go: Add support for go get {tarball URL} #14076

mappu opened this issue Jan 23, 2016 · 1 comment

Comments

@mappu
Copy link

mappu commented Jan 23, 2016

Feature request

It should ultimately become possible to go get https://example.com/path/to/release-latest.tar.xz and use the package as import "example.com/path/to/release", or something like that.

Rationale

  1. To support a pre-existing packaging workflow that produces tarball artefacts
  2. To offer a maximally lightweight method for deploying go get-able packages on low-end servers.

Implementation

I think it should be possible to implement initially in src/cmd/go/vcs.go as a new vcsCmd type that shells out to external wget/curl and tar binaries, in much the same way as the existing code.

The go-get process for tarballs is simple enough that it should eventually be rewritten to use internal http/tar/unzip libraries where possible, improving the cross-platform story (especially on Windows where external curl/wget/tar binaries are unexpected). But, i think this would require refactoring the helper method func (v *vcsCmd) run1 to not always assume it's operating on an external command binary - and archive/tar does not automatically implement compression for the common case of tar.(gz|bz2|xz), so that would need to be processed too.

@bradfitz
Copy link
Contributor

Sorry, but this is not a direction we're interested in going. The argument to "go get" is a package name, not a URL.

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

3 participants