Skip to content
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

Add external config file support to make editors configurable #80

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

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.

None yet

1 participant