Custom Structure tags

Add custom tags to any fields from structures

GoLand has a few Live Templates builtin for struct tags, such as json or xml.

How to use:

You can add your own structure field tag by going to Settings/Preferences | Editor | Live Templates and then select Go Struct Tags.

Then you can either customize an existing template, duplicate it, or create a new one.


Related Resources

Create getters and setters for struct fields
Create getters and setters for struct fields
Generate the support code to access fields indirectly, via getters and setters
Improve Code Readability and Navigation
Improve Code Readability and Navigation
Discover how to manage code visibility with code folding in Go
Create a function in another package
Create a function in another package
Type a non-existing function name and generate its implementation in a package of your choice