为了账号安全,请及时绑定邮箱和手机立即绑定

“go build”不会在golang中生成文件

“go build”不会在golang中生成文件

Go
慕村9548890 2021-10-18 15:19:03
我以前是用来go build生成文件的。但我只能 generate main,这意味着go build main.go工作而go build dao.go不会产生任何东西?我怎样才能生成dao?
查看完整描述

1 回答

?
一只斗牛犬

TA贡献1784条经验 获得超2个赞

来自go help build:


When the command line specifies a single main package,

build writes the resulting executable to output.

Otherwise build compiles the packages but discards the results,

serving only as a check that the packages can be built.


查看完整回答
反对 回复 2021-10-18
  • 1 回答
  • 0 关注
  • 349 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号