Skip to content

Conversation

@kingeasternsun
Copy link

Use external config file

when we use editors like vscode to add tags, the vscode can only add json tags for us, there is no way to change the config, so I add a toml config support.
we just need add a gomodifytags.toml in the same directory of gomodifytags. in linux we can use whereis gomodifytags to get the directory.

Add = ["form", "gorm","binding"]
Transform = "camelcase"
[TemplateMap]
  gorm = "column:$field"
  binding = "required"
[TransformMap]
  gorm = "snakecase"
  • the Add will add external tags to flag tag.
  • the Transform will config transform for all tag.
  • the TemplateMap will config template for each tag,overwrite the flag template.
  • the TransformMap will config transform for each tag,overwrite the flag transform and Transform.

gomodifytags

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.

1 participant