An optional buildpack for the Go language family that runs go generate
.
For some Go applications, generated files are not committed to the repository. They are expected to be generated at buildtime (for example, generating embedded files.)
Technically, this buildpack would run before the go-build
buildpack
in a custom builder's configuration as we are not looking to integrate
this buildpack into the Go language family buildpack
at this time.
There is another RFC
for adopting this buildpack into the Go language family buildpack if it makes sense.
A new go-generate
buildpack will be developed to run the command go generate ./...
when BP_GO_GENERATE=true
.
Eventually, it can be optimized to allow specifying which generate commands
should be run as defined in the other RFC.
The buildpack will pass detection if the BP_GO_GENERATE
environment variable
is set to true
.
The buildpack will run go generate ./...
in the directory.