fatih/gomodifytags

Add new transformation where acronyms are in capital case

drornir opened this issue · 2 comments

I use the camelcase transformation, but I have one issue with it.
In my API, we use the go linter conventions regarding acronyms in our JSONs:
we use keys like userID instead of userId.

I did not find a way to preserve this behavior.

I don't even mind writing the PR if that's OK with you

fatih commented

Hi @drornir

How do we decide which words are acronyms? I believe the camelcase package already takes care of this: https://github.com/fatih/camelcase Can you give an example on what you want to do?

gomodifytags is usually intended to be used from within your editor, hence I'm not sure if we should add this single use-case, but I'm curious about your use case and would like to learn more :)

Well, I think I made a mistake reporting this. It works fine, just like I want :)

I referred to this: https://github.com/golang/go/wiki/CodeReviewComments#initialisms