cmd/go: add go generate -exec
flag like go run -exec
and go test -exec
#69487
Labels
FeatureRequest
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
I sometimes use
go run -exec
to quickly check how long a program takes to run excluding the build time, for example:Similarly, I have found
go test -exec
very useful on occasion, for example to test for a different OS likeGOOS=windows go test -exec=wine
, or to test under a different environment like with https://github.com/mvdan/dockexec.I wish I could do something similar with
go generate
. For example, in one of my projects,go generate ./...
in CI takes twelve seconds, and I'd like to dig into which of the steps is taking longer than I would expect. For this reason I'd love to be able to dogo generate -exec=time ./...
or something similar with a short script.The text was updated successfully, but these errors were encountered: