openfaas / golang-http-template

Golang templates for OpenFaaS using HTTP extensions
https://www.openfaas.com/
MIT License
106 stars 57 forks source link

Workaround for #33 - go sub-modules #34

Closed alexellis closed 4 years ago

alexellis commented 4 years ago

Workaround for #33 - go sub-modules

Fixes: #33

Go sub-modules do not work with this template, because the of limitations on how local imports and the "replace" word works in Go modules. You can only use "replace" in the root-level module i.e. "main.go"

https://github.com/golang/go/wiki/Modules#gomod

This patch was tested with the following repo:

git@github.com:alexellis/golang-middleware-relative-import.git

Signed-off-by: Alex Ellis (OpenFaaS Ltd) alexellis2@gmail.com

alexellis commented 4 years ago

Lgtm from Lucas on Slack. We'll treat this as experimental, unsupported for the time being and gauge interest