Home
Sign Up
Sign In
V2EX
›
问与答
golang 在 pkg 中的包有好几个 main,这样子的代码在实际编写的时候怎么测试,如图
proxytoworld
·
Apr 30, 2021
· 1319 views
This topic created in 2015 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
learningman
Apr 30, 2021 via Android
1
goland 加个 target
Muninn
Apr 30, 2021
2
一般测试不测试 main 吧,无论单元测试还是集成测试都是单独运行测试的。
非想一个一个运行 main 用 goland 就可以,用 vscode 你写个 shell 一个一个来就完了。
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
4918 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 105ms ·
UTC 01:20
·
PVG 09:20
·
LAX 17:20
·
JFK 20:20
♥ Do have faith in what you're doing.
❯