Skip to content

Instantly share code, notes, and snippets.

@chrisneal
Created September 29, 2017 14:31
Show Gist options
  • Save chrisneal/a160e1de6824e3c591b9720b2ab7d463 to your computer and use it in GitHub Desktop.
Save chrisneal/a160e1de6824e3c591b9720b2ab7d463 to your computer and use it in GitHub Desktop.
Bash function I use for symlinking the go projects outside of my GOPATH into my GOPATH
linktogopath() {
if [ "$1" = "" ]; then
local folder=${PWD##*/}
else
local folder=$1
fi
ln -s $(PWD) $GOPATH/src/$1
cd $GOPATH/src/$folder
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment