Bug
PostgreSQL quoted identifiers can contain backticks. The Go type generator currently embeds column names directly in a raw struct-tag literal, so a column such as badtagterminates the literal early and produces Go source thatgofmt` cannot parse.
Reproduction
Generate Go types for a table containing a column whose name includes a backtick, then pipe the generated source to gofmt. It fails with syntax errors including expected semicolon and string literal not terminated.
Expected behavior
The generated struct tag should preserve the PostgreSQL column name while remaining valid Go source. Ordinary column names should retain their current output.
Bug
PostgreSQL quoted identifiers can contain backticks. The Go type generator currently embeds column names directly in a raw struct-tag literal, so a column such as
badtagterminates the literal early and produces Go source thatgofmt` cannot parse.Reproduction
Generate Go types for a table containing a column whose name includes a backtick, then pipe the generated source to
gofmt. It fails with syntax errors includingexpected semicolonandstring literal not terminated.Expected behavior
The generated struct tag should preserve the PostgreSQL column name while remaining valid Go source. Ordinary column names should retain their current output.