-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
304ba5d didn't correctly handle struct tags whose value contained a space. (My fault.) Use a proper struct tag library with a dedicated parser that handles all the edge cases. Less code, and better.
- Loading branch information
Showing
6 changed files
with
24 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
internal/endtoend/testdata/overrides_go_struct_tags/sqlite/go/models.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 6 additions & 3 deletions
9
internal/endtoend/testdata/overrides_go_struct_tags/sqlite/schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
CREATE TABLE foo ( | ||
other text NOT NULL, | ||
tagged text NOT NULL | ||
tagged text NOT NULL, | ||
tag3 text NOT NULL | ||
); | ||
|
||
CREATE TABLE bar ( | ||
other text NOT NULL, | ||
also_tagged text NOT NULL | ||
also_tagged text NOT NULL, | ||
tag3 text NOT NULL | ||
); | ||
|
||
CREATE TABLE baz ( | ||
other text NOT NULL, | ||
also_tagged text NOT NULL | ||
also_tagged text NOT NULL, | ||
tag3 text NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters