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;

 

 

运行效果截图:

  Golang  bash alias 自动配置GOPATH并运行项目

 

 

 


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

相关文章:

  • 2021-04-03
  • 2021-05-29
  • 2021-06-28
  • 2021-06-16
  • 2021-06-30
  • 2021-11-19
  • 2021-12-10
  • 2021-10-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-05-07
  • 2022-01-08
  • 2021-12-19
  • 2021-08-14
相关资源
相似解决方案