Goland 生成可执行文件

Goland通过调用go build 生成可执行文件。
默认Goland是可以执行程序,但你找不到可执行文件。
你需要自定义配置文件。


创建go build配置文件
Run kind 选Directory
Directory 选你的main包所在文件夹
Output directory设置与go build -o 不相容,所以不用设置,我们使用-o参数来控制可执行文件的路径以及名字
Working directory保持默认就好
Go tool arguments 就是go build 的参数

参考:

https://www.cnblogs.com/xiyu714/p/9894285.html

posted on 2021-01-20 23:11  sunylat  阅读(811)  评论(0编辑  收藏  举报