-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add go_package cmd param #413
Comments
I'm not sure I understand why that particular behavior matters, then again, I don't think there's anything preventing that feature. That being said.... @go-jet what do you think about simply exposing the 'templates' as files the user can override? Right now, file_templates.go contains all these static data. You can use embed.FS and have a fallback to read from a predefined directory like jet_templates/table.tmpl.go It would allow users to add their own customizations without being forced to commit the change upstream and wait for a release? |
Exposing template file will make them part of the public API, which entails a commitment to maintain and support them unchanged until the next major release. There are also numerous If a developer needs to customize the template, they always have the option to fork the project and implement any necessary modifications. |
I think this would be a good addition to the command line parameters. @go-jet I can take a look into this if you're fine with adding some optional parameters to the cli |
Of course, please go ahead. |
Alright, I'll start working on it. |
Do these CLI flags work?
|
Sounds good. 👍 |
I've added a PR #424, please review at your convenience. |
The flags are |
It will be closed with a new release(2.13.0). |
I need to generate my go structs in a different package. The package name is repo.
Currently the generator will always generate with package name model, enum or table.
Solution (preferred):
I'd like another parameter to be added that allows me to define the go package name for the generated files. (Or multiple parameters for each package)
jet -dsn=postgres://$APP_DATABASE_USER:$APP_DATABASE_PASSWORD@localhost:$APP_DATABASE_PORT/$APP_DATABASE_NAME?sslmode=disable -schema=public -path=./.gen
-gopkgmodel=entities, -gopkgtable=something, -gopkgenum=dbenums
Something like this would help a lot!
#208 does not solve my issue. I think this should be easily accessible via CLI.
The text was updated successfully, but these errors were encountered: