Closed alimy closed 4 years ago
//go:generate go run main.go
func main() {
log.Println("generate code start")
opts := core.Options{
core.RunMode(core.InSerialMode),
core.GeneratorName(core.GeneratorGin),
core.SinkPath("./gen"),
core.Cleanup(true), // cleanup out first when re-generate code if set true
}
if err := engine.Generate(opts); err != nil {
log.Fatal(err)
}
log.Println("generate code finish")
}