Skip to content

Instantly share code, notes, and snippets.

@lmatter
Last active December 2, 2019 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lmatter/dd3c95de7155f9450325c3f9c4153fe2 to your computer and use it in GitHub Desktop.
Save lmatter/dd3c95de7155f9450325c3f9c4153fe2 to your computer and use it in GitHub Desktop.
Bash script to translate github repo url (e.g., from clone button) into "go get" syntax.
#!/bin/bash
import=$(echo $1 |cut -f2 -d@ | tr ':' /)
go get ${import%.*}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment