goclone is a tool to clone Go repositories from GitHub and other sources to
$GOPATH and start working on them right away. No more turning your
~/go into a hot mess.
ahmetb/govvv from GitHub, and start a new shell:
$ goclone ahmetb/govvv
k8s.io/kubernetes and run
cat LICENSE in its directory.
$ goclone k8s.io/kubernetes -- cat LICENSE
https://github.com/rakyll/gops and set GOPATH/PWD in the current shell:
$ eval $(goclone -q https://github.com/rakyll/gops)
hub(1)tool if present. This allows cloning of private repositories.
ahmetb/govvv: GitHub repo name
[email protected]:user/repo.git: GitHub SSH format (works w/ private repos)
https://github.com/rakyll/hey: GitHub URL, pasted from web browser
gopkg.in/mgo.v2: Go import path, does not have to be GitHub
$GOPATH/binis added to your
$PATHautomatically. This makes
go installeasier to use.
goclone file to your
chmod +x it.
One-line install script for macOS/Linux:
sudo wget -qO/usr/local/bin/goclone \ https://rawgit.com/ahmetb/goclone/master/goclone && \ sudo chmod +x /usr/local/bin/goclone
Brought to you by @ahmetb.