DEV Community

loading...

Discussion on: Using code generation to survive without generics in Go

Collapse
siteshen profile image
siteshen

I've implemented database model generator use almost the same way. With the help of go:generate, model user don't have to care about the code generator. They can add model easily in this way:

cp user.go new_model.go
# adjust new_model fields && the go:generate comment
go go:generate && go build