Support for non-standard go build path
lance opened this issue · 1 comments
lance commented
Hello, we would like to use the s2i golang library to build Go functions in Knative Functions. The function project looks like this:
❯ tree .
.
├── README.md
├── faas
│ └── main.go
├── func.yaml
├── go.mod
├── go.sum
├── handle.go
└── handle_test.go
As you can see, the main.go
file is in the faas
subdirectory. However, with the golang s2i builder image, there is no way to specify this in the command. A similar feature exists, for example, in paketo buildpacks, allowing developers to set the environment variable BP_GO_TARGETS
, resulting in a build command that looks like this:
go build -o /layers/paketo-buildpacks_go-build/targets/bin -buildmode pie -trimpath ./faas
Could something similar be added to the golang s2i builder to enable this functionality?
alexsaezm commented
I realized the linked issue was closed because it was obsolete. I'll close this one, but if it's still important, feel free to open it again. Thank you!