go-struct-tag
A Visual Studio Code extension for autocomplete the go struct tag when typing.
Note
If it doesn't work, please add the following configuration in settings.json.
Open Command Palette (⌘ + ⇧ + P) then Preferences: Open Settings (JSON)
"editor.quickSuggestions": {
"strings": true
}
Configuration
go-struct-tag.cases
Add entry into go-struct-tag.cases to set the field name format.
Supported:
snake
camel
pascal
constant
none
Below are the default settings:
"go-struct-tag.cases": [
"snake",
"camel"
]
Use custom tags.
example:
"go-struct-tag.customTags": {
"mytag1": {
"cases": [
"snake"
],
"options": [
"omitempty",
"string",
"-"
],
"separator": ","
},
"mytag2":{}
}
mytag1
, mytag2
: Custom tag name
cases
: Field name formatting for this tag. If not set use the value of go-struct-tag.cases
options
: A list of options following the field name. If not set no options will be used
separator
: Separator between options. if not set, use ,
Features
Supported tags: