【发布时间】:2017-07-03 18:59:55
【问题描述】:
我有一个main.go 和mypkg/...go。我使用go build -o main main.go 或go install <pkg that has main.go>,其中有一些我需要的标志。但我也看到了测试标志。为什么会这样?我错过了什么?
Usage of ./main:
-docker string
Docker API Path, defaults to local (default "unix:///var/run/docker.sock")
-httptest.serve string
if non-empty, httptest.NewServer serves on this address and blocks
-port int
The default port to listen (default 8000)
-test.bench string
regular expression per path component to select benchmarks to run
-test.benchmem
print memory allocations for benchmarks
-test.benchtime duration
approximate run time for each benchmark (default 1s)
-test.blockprofile string
write a goroutine blocking profile to the named file after execution
-test.blockprofilerate int
if >= 0, calls runtime.SetBlockProfileRate() (default 1)
dockerPath 和 port 是我的标志,但你可以看到其他的不是我的标志。
【问题讨论】: