Skip to content

#191. Configurable struct tags casing by cmdline argument struct-tag-casing #194

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

Merged
merged 1 commit into from
Aug 28, 2017

Conversation

jfernstad
Copy link
Contributor

PR related to issue #191

According to discussion, here is the implementation.

@jfernstad jfernstad changed the title #191. Configurable struct tags casing by cmdline argument struct-tag-casing argument #191. Configurable struct tags casing by cmdline argument struct-tag-casing Aug 25, 2017
Copy link
Member

@aarondl aarondl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good except the indentation. We can worry about the suggestion about different struct tags for different serializations when we see it as a use case.

{{titleCase $column.Name}} {{$column.Type}} `{{generateTags $dot.Tags $column.Name}}boil:"{{$column.Name}}" json:"{{$column.Name | camelCase}}{{if $column.Nullable}},omitempty{{end}}" toml:"{{$column.Name | camelCase}}" yaml:"{{$column.Name | camelCase}}{{if $column.Nullable}},omitempty{{end}}"`
{{- else -}}
{{titleCase $column.Name}} {{$column.Type}} `{{generateTags $dot.Tags $column.Name}}boil:"{{$column.Name}}" json:"{{$column.Name}}{{if $column.Nullable}},omitempty{{end}}" toml:"{{$column.Name}}" yaml:"{{$column.Name}}{{if $column.Nullable}},omitempty{{end}}"`
{{end -}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Templates use tabs for indentation like Go code. The inconsistency is visible on the Github PR.

@aarondl aarondl merged commit 6b7351d into volatiletech:dev Aug 28, 2017
@aarondl
Copy link
Member

aarondl commented Aug 28, 2017

Hah. Wasn't supposed to merge this. I'll fix the indentation. Thanks!

aarondl added a commit that referenced this pull request Aug 28, 2017
@jfernstad
Copy link
Contributor Author

😄 much obliged!

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

Successfully merging this pull request may close these issues.

3 participants