Golang bash alias 自动配置GOPATH并运行项目
BASH代码:
source ~/.bash_profile; export GOPATH=$GOPATH:`cd ..; pwd`; echo -e "* GOPATH: $GOPATH\n\nInput file name:"; read file; echo -e "\n* FILE NAME: $file\n\n"; go run $file;
运行效果截图:
Stay hungry,stay foolish.