Home
Sign Up
Sign In
V2EX
›
问与答
golang 在 pkg 中的包有好几个 main,这样子的代码在实际编写的时候怎么测试,如图
proxytoworld
·
Apr 30, 2021
· 997 views
This topic created in 1850 days ago, the information mentioned may be changed or developed.
在这个仓库中有好几个 main 包里面都有 main.go ,在编写的时候怎么逐个运行 main
main
编写
Golang
pkg
2 replies
•
2021-04-30 13:40:54 +08:00
1
learningman
Apr 30, 2021 via Android
goland 加个 target
2
Muninn
Apr 30, 2021
一般测试不测试 main 吧,无论单元测试还是集成测试都是单独运行测试的。
非想一个一个运行 main 用 goland 就可以,用 vscode 你写个 shell 一个一个来就完了。
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
2777 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 466ea39e · 44ms ·
UTC 10:27
·
PVG 18:27
·
LAX 03:27
·
JFK 06:27
♥ Do have faith in what you're doing.
❯