stephenafamo / bob

SQL query builder and ORM/Factory generator for Go with support for PostgreSQL, MySQL and SQLite
https://bob.stephenafamo.com
MIT License
701 stars 37 forks source link

Not all configurations working #202

Closed HTechHQ closed 2 months ago

HTechHQ commented 2 months ago

It looks like not all configuration values are working. I reported a similar issue in https://github.com/stephenafamo/bob/issues/201 Others like output and uuid_pkg are working for me.

I am setting the following values and they don't have any impact on the generated code. Is there something wrong with my approach?

  tags:
    - json
  struct_tag_casing: camel

the generated code is:

type User struct {
    ID              uuid.UUID           `db:"id,pk" `
    CreatedAt       time.Time           `db:"created_at" `
    UpdatedAt       time.Time           `db:"updated_at" `
        // ....
}

Expected json tags as part of the generated model

Note: The current tags end with a whitespace, even if not tags configuration is set

Version $ bobgen-psql --version bobgen-psql version v0.25.0

HTechHQ commented 2 months ago

The config file has the wrong strucutre, found it in https://github.com/stephenafamo/bob/issues/174#issuecomment-1932840669