Created
September 29, 2017 14:31
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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