clipperhouse / gen

Type-driven code generation for Go
http://clipperhouse.com/gen/overview/
Other
1.43k stars 90 forks source link

Support work with go modules #113

Open Kipriz opened 5 years ago

Kipriz commented 5 years ago

Right now, it is not possible to run gen for projects that are not under GOPATH It would be great to work outside of GOPATH using go modules.

seaskyways commented 5 years ago

Please this is very needed

vzool commented 4 years ago

Hi @Kipriz, I just created a bash script that build and copy gen command inside your project. So, you can just type gen on the root of your project folder. I hope it help you out. Thanks

vzool commented 4 years ago

Haha, after creating the bash script, I test the tool itself and it doesn't support modules at all. :( Error message example: main.go:7:4: could not import example-app/app (can't find import: "example-app/app")

alexec commented 4 years ago

gen appears to be unusable with any Gomodules project. As everyone can be expected to move to Gomodules, this really needs to be fixed.

rickb777 commented 4 years ago

[shameless plug]-> You could try rickb777/runtemplate instead. (also rickb777/collection for predetermined collection types)