go-generate¶
Run each command in a package described by a //go:generate directive. This is equivalent to running go generate on a Go package.
Note: Just like with go generate, the go-generate goal is never run as part of the build and must be run manually to invoke the commands described by the //go:generate directives.
See https://go.dev/blog/generate for details.
Backend: pants.backend.experimental.go
Config section: [go-generate]
Basic options¶
None
Advanced options¶
env_vars¶
--go-generate-env-vars="['<str>', '<str>', ...]"
PANTS_GO_GENERATE_ENV_VARS
default:
Environment variables to set when invoking generator programs. Entries are either strings in the form ENV_VAR=value to set an explicit value; or just ENV_VAR to copy the value from Pants's own environment.
Can be overridden by field go_generate_env_vars on local_environment, docker_environment, or remote_environment targets.
Deprecated options¶
None