Add flag for controlling out path for model gen
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Melody Becker 2025-04-07 10:40:59 +02:00
parent 349e78e433
commit befbc07946
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI

View file

@ -19,6 +19,7 @@ import (
)
func main() {
flagOutPath := flag.String("outpath", "./dbgen", "Set the path to generate to")
other.SetupFlags()
flag.Parse()
other.ConfigureLogging(nil)
@ -36,7 +37,7 @@ func main() {
}
log.Info().Msg("Connected to db")
g := gen.NewGenerator(gen.Config{
OutPath: "./dbgen",
OutPath: *flagOutPath,
Mode: gen.WithoutContext | gen.WithDefaultQuery | gen.WithQueryInterface, // generate mode
})
g.UseDB(db)