frugal
frugal copied to clipboard
Don't require the frugal library to be cloned to generate go code
"Generated go files do not include the import "github.com/Workiva/frugal/lib/go"
declaration unless you have a GOPATH setup with that lib, which should not be necessary for just the binary to run.
Steps to reproduce:
$ unset GOPATH
$ frugal --version # Just for the record here
frugal version 2.2.1
$ frugal --gen go example.frugal
$ cat gen-go/example/f_fooservice_service.go
and notice that f_fooservice_service.go is not a valid go file because it doesn't have import "github.com/Workiva/frugal/lib/go"
."
This is because we run goimports on the generated output currently
After some investigation, this is used due to https://github.com/Workiva/frugal/issues/100, so just removing goimports isn't a valid solution, we need to make sure all imports from other generated includes are used