Add Keys to Struct Field Tags

Quickly add JSON, XML, or custom keys to all struct fields.

If you need to add keys to existing struct types, you can now do this quicker using the dedicated Add key to tags feature.

Place the cursor on a struct type, then press ⌃⏎ (macOS) / Ctrl+Enter (Windows/Linux).

From the Context Actions menu, select Add key to tags, and start typing the key name.


Related Resources

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.
Empower your `Printf`-like functions with coding assistance
Empower your `Printf`-like functions with coding assistance
Provide hints and highlights for message formats in custom `Printf`-like functions.