In one of my go projects, I run os.Exit(1) and it prints out exit status 1. How can I disable this message to be printed?
执行os.Exit(1)时如何禁用“退出状态1”
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
douweihui0178 2014-11-12 19:32关注To disable the message, don't use
go run.go runis a tool to conveniently compile one or more go files into a temporary location, execute the binary, and clean up. Your executable is run in a sub-process, and thegotool is reporting the exit status for you.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报