openfaas / templates

OpenFaaS Classic templates
https://www.openfaas.com
MIT License
279 stars 227 forks source link

Add optional support for Go modules via build-arg for "go" template #189

Closed alexellis closed 4 years ago

alexellis commented 4 years ago

Add optional support for Go modules via build-arg for "go" template

Expected Behaviour

Should be able to pass this and use Go modules:

faas-cli build --build-arg GO111MODULE=on

Current Behaviour

We just support using a vendor folder at present, or using go modules to get a vendor folder, then turning it off for the build.

Possible Solution

See the golang-middleware template as an example and replicate 1:1

https://github.com/openfaas-incubator/golang-http-template/tree/master/template/golang-middleware

Also copy the approach for golang-armhf.

alexellis commented 4 years ago

I'd like an experienced OpenFaaS contributor to take on this work who can also give an estimated time of completion.

alexellis commented 4 years ago

/assign: Waterdrips

alexellis commented 4 years ago

Alistair is away for a bit, so if someone can get to this, please do

LucasRoesler commented 4 years ago

/assign: me