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;

 

 

运行效果截图:

  

 

 

 


 转载请注明出处:http://www.cnblogs.com/ficow/p/6637980.html

posted @ 2017-03-29 09:07  Ficow  阅读(588)  评论(0编辑  收藏  举报