GoTagMate is a powerful and user-friendly VSCode extension designed to simplify working with Go struct tags. It provides intelligent suggestions, autocompletion, and detailed documentation for popular Go libraries like json, gorm, validate, and many more. Press Ctrl + Space if suggestions don't appear automatically.
Why GoTagMate? Writing Go struct tags manually can be tedious and error-prone. Missing a comma, mistyping a field, or forgetting a tag option can break your code. GoTagMate solves this problem by automatically suggesting and completing struct tags, reducing errors and boosting productivity.
- Smart Autocompletion: Start typing a struct tag, and GoTagMate suggests valid options instantly.
- Context-Aware Suggestions: It knows what tag you're using (
json,gorm,validate, etc.) and provides relevant completions. - Hover Descriptions: Hover over a tag to see its meaning and usage examples.
- Error Reduction: Avoid typos and formatting mistakes with GoTagMate’s structured suggestions.
- Backtick (`) Trigger: Suggestions appear as soon as you type a backtick inside a Go struct.
- Regex-Based Parsing: Detects cursor position and tag context dynamically.
- Extensive Library Support (See Supported Libraries)
- Re-Trigger on Key Presses: Automatically shows suggestions when typing
,=,;, or,. - Lightweight and Fast: Optimized to ensure minimal impact on VSCode performance.
- Install GoTagMate from the VSCode Marketplace or manually via
.vsix. - Open a Go file in VSCode.
- Start typing a struct field and add a backtick
``. - Select a tag from the suggestions (e.g.,
json:""). - Use contextual suggestions to complete the tag (e.g.,
omitempty,string). - Hover over suggestions to see descriptions and usage examples.
- If suggestions don’t appear, press
Ctrl + Spaceto manually trigger them.
Pro Tip: Enable the following VSCode settings for the best experience:
"editor.hover.enabled": true, "editor.parameterHints.enabled": true, "editor.quickSuggestions": true
GoTagMate provides struct tag suggestions for the following popular Go libraries:
bson(MongoDB)gorm(ORM)validate(Validation)json(Standard JSON)yaml.v3(YAML Parsing)xml(XML Processing)env(Environment Variables)msgpack(MessagePack)dynamodb(AWS DynamoDB)redis(Redis)gin(Gin Web Framework)bun(Bun ORM)conform(Data Normalization)toml(TOML Parsing)go-toml(TOML Parsing)hcl(HCL Parsing)
... and many more! (See DOCS.md for the full list)
🚨 Without GoTagMate:
- Manual struct tag writing is tedious and error-prone.
- You need to constantly check documentation.
- Forgetting a tag format or mistyping causes bugs.
- Productivity suffers due to repetitive work.
✅ With GoTagMate:
- Saves Time by suggesting tags instantly.
- Prevents Errors with correct tag syntax.
- Boosts Productivity by automating struct tag completion.
- Simplifies Learning for beginners with descriptions and examples.
If you're working with Go structs, GoTagMate is a must-have tool to streamline your development workflow.
- Open VSCode.
- Go to Extensions (
Ctrl + Shift + X). - Search for Go Tag Mate.
- Click Install and reload VSCode.
- Download the latest
.vsixfile from the Releases page. - Open VSCode and go to Extensions (
Ctrl + Shift + X). - Click the three-dot menu (
...) > Install from VSIX.... - Select the downloaded
.vsixfile and install. - Restart VSCode.
To ensure GoTagMate works seamlessly, make sure the following settings are enabled:
"editor.hover.enabled": true,
"editor.parameterHints.enabled": true,
"editor.quickSuggestions": trueThese settings enable hover descriptions and inline suggestions, making GoTagMate even more powerful.
Want to improve GoTagMate? Contributions are welcome! 🎉
- Report Issues: Found a bug or missing tag? Open an issue.
- Suggest Features: Have an idea to enhance GoTagMate? Let us know!
- Code Contributions: Fork the repo, make changes, and submit a PR.
This project is licensed under the MIT License. See the LICENSE file for details.
If you find GoTagMate useful, consider giving it a ⭐ on GitHub!
