开发Golang命令行的工作流程

huangapple go评论69阅读模式
英文:

Workflow for developing Golang command-line

问题

我正在寻找构建我的第一个Go命令行应用程序。我感觉有些不知所措...在这种情况下,典型的工作流程是什么样的?

我试图编写一些Go代码,然后在vim中运行go build,然后在另一个终端选项卡中尝试运行程序,但是仅仅使用go build似乎不能构建并安装程序到我的系统上。我尝试使用-i选项,第一次可以工作,但之后就无法更新了。

我知道这可能很愚蠢,但希望你能指点我正确的方向。

英文:

I'm looking to build my first Go command-line app. I feel really out of sorts...What would the typical workflow look like when doing something like that?

I'm attempting to write some go and then I run go build in vim and attempt to run the program with another terminal tab, but go build alone doesn't seem to build the program and install it on my system. I tried with the -i and that worked the first time, but didn't update it after.

I'm sure it's silly, but hopefully you can point me in the right direction.

答案1

得分: 1

go buildgo install 完成了任务!

英文:

go build && go install did the trick!

huangapple
  • 本文由 发表于 2014年11月13日 09:51:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/26900026.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定