()
| 363 | } |
| 364 | |
| 365 | func parseFlags() { |
| 366 | flag.StringVar(&goarch, "goarch", runtime.GOARCH, "GOARCH") |
| 367 | flag.StringVar(&goos, "goos", runtime.GOOS, "GOOS") |
| 368 | flag.StringVar(&goCmd, "gocmd", "go", "Specify `go` command") |
| 369 | flag.BoolVar(&noupgrade, "no-upgrade", noupgrade, "Disable upgrade functionality") |
| 370 | flag.StringVar(&version, "version", getVersion(), "Set compiled in version string") |
| 371 | flag.BoolVar(&race, "race", race, "Use race detector") |
| 372 | flag.StringVar(&extraTags, "tags", extraTags, "Extra tags, space separated") |
| 373 | flag.StringVar(&installSuffix, "installsuffix", installSuffix, "Install suffix, optional") |
| 374 | flag.StringVar(&pkgdir, "pkgdir", "", "Set -pkgdir parameter for `go build`") |
| 375 | flag.StringVar(&cc, "cc", os.Getenv("CC"), "Set CC environment variable for `go build`") |
| 376 | flag.BoolVar(&debugBinary, "debug-binary", debugBinary, "Create unoptimized binary to use with delve, set -gcflags='-N -l' and omit -ldflags") |
| 377 | flag.BoolVar(&coverage, "coverage", coverage, "Write coverage profile of tests to coverage.txt") |
| 378 | flag.BoolVar(&long, "long", long, "Run tests without the -short flag") |
| 379 | flag.IntVar(&numVersions, "num-versions", numVersions, "Number of versions for changelog command") |
| 380 | flag.StringVar(&run, "run", "", "Specify which tests to run") |
| 381 | flag.StringVar(&benchRun, "bench", "", "Specify which benchmarks to run") |
| 382 | flag.StringVar(&buildOut, "build-out", "", "Set the '-o' value for 'go build'") |
| 383 | flag.Parse() |
| 384 | } |
| 385 | |
| 386 | func test(tags []string, pkgs ...string) { |
| 387 | lazyRebuildAssets() |
no test coverage detected