3 ms·
Maybe a bit off-topic but does someone know of a good code scaffold generator for go? Something like rails new, and rails generate?
by hit8run 5y ago
Maybe a bit off-topic but does someone know of a good code scaffold generator for go? Something like rails new, and rails generate?
- halpert 5y agogo mod init touch main.go
- sofixa 5y agoGo generate if I'm understanding you correctly?
- dahx4Eev 5y agoSomething like spf13/cobra?
- tekstar 5y agoIt really depends on what you want to scaffold, but I took a minimal approach and use: https://github.com/boourns/scaffold https://github.com/boourns/scaffold - generates a SQL select/insert/update layer, currently specifically for SQLite. https://github.com/boourns/go-gql-typescript-example https://github.com/boourns/go-gql-typescript-example - an example project using scaffold for the model layer, https://gqlgen.com https://gqlgen.com to generate the graphql layer, and typescript. This is my currently preferred stack. Currently in my second year of working on a 25k LOC project in this stack and it has scaled up to meet those demands.