camelCase json for Golang struct tads

Hi! How to convert SomeValue `json:"some_value"` auto completion to SomeValue `json:"someValue"?


Please go to "Settings | Editor | Live Templates | Go Struct Tags" and either edit or duplicate the existing "json", then click on "Edit variables" button and select how the field should be transformed, by default it is "snakeCase(fieldName())" but you can use something like "capitalize(fieldName())" instead or anything from the available list of transformations.

Please see for a list of available transformations and how they work.


Edit: Provided the correct IDE link.

Thanks! camelCase(fieldName()) work as expected for me!


I have as you suggested, and now it does not autocomplete anymore with the name field


it doest not work for me



You need to change both of `json` live template. Likely you changed one but use another.


@Alexander Zolotov 

Thanks. After setup new tag rule at Live Template/GO/json & Live Template/Go Struct Tags/json. It works as expected 


Hi, I configured the tag rule in both places and it worked fine, but after upgrading it, it stops working, I have 2021.1.2


I don't remember the version I had when it was working but with the last two upgrades at least I started to notice the issue. My configuration was like the one you posted, but with the $END$ variable, I just removed it, and now is working again.

Originally I had `json:"$FIELD_NAME$"$END$`





Sorry, my mistake, it is working only if it is the first tag, the problem is related to the ticket to filed.


Please follow GO-11005 to autodetect field name style in the struct tags. Note that you should invoke json abbreviation without backticks if you configured a template like in my previous message. Templates inside backticks always produce struct tags with snake_case and there is no way to configure it yet.

Also, pay attention that you can change the style of the field name for all tags in one click:


Daniil thanks a lot, I was about to bang my head to the desk then I read your message :)