Skip to content
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

Duplicating // Code generated by gorm.io/gen. DO NOT EDIT. when gentool is executed #1222

Open
yarex007 opened this issue Oct 4, 2024 · 0 comments

Comments

@yarex007
Copy link

yarex007 commented Oct 4, 2024

Description

gentool -c ./generate_db_structs.yaml

where my yaml is


version: "0.1"
database:
  dsn: "host=localhost user=postgres password=postgres dbname=pet_graveyard port=5432 sslmode=disable"
  db : "postgres"
  onlyModel : true  
  outPath :  "e:/Repository/Golang/database/entities"
  withUnitTest : false
  modelPkgName : "entities"
  fieldNullable: true
  fieldWithIndexTag : false
  fieldWithTypeTag  : true

works fine but duplicates // Code generated by gorm.io/gen. DO NOT EDIT.
lines at the top of generated structs, so after 10 executions i end up with


// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

followed by generated code

also would be nice to be able to use relative paths for outPath in yaml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant