
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.
🚀 Features
🧑💻 For Beginners and Pros Alike
- 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.
🛠 Technical Features
- 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.
📖 Usage Guide
✨ How to Use GoTagMate?
- 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 + Space
to 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
📌 Supported Libraries
GoTagMate provides struct tag suggestions for the following popular Go libraries:
... and many more! (See DOCS.md
for the full list)
🔥 Why You Need GoTagMate
🚨 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.
🛠 Installation
Option 1: Install from VSCode Marketplace
- Open VSCode.
- Go to Extensions (
Ctrl + Shift + X
).
- Search for Go Tag Mate.
- Click Install and reload VSCode.
Option 2: Install Manually (.vsix file)
- Download the latest
.vsix
file from the Releases page.
- Open VSCode and go to Extensions (
Ctrl + Shift + X
).
- Click the three-dot menu (
...
) > Install from VSIX....
- Select the downloaded
.vsix
file and install.
- Restart VSCode.
⚡ Configuration
To ensure GoTagMate works seamlessly, make sure the following settings are enabled:
"editor.hover.enabled": true,
"editor.parameterHints.enabled": true,
"editor.quickSuggestions": true
These settings enable hover descriptions and inline suggestions, making GoTagMate even more powerful.
🤝 Contributing
Want to improve GoTagMate? Contributions are welcome! 🎉
Application Overview
Ways to Contribute:
- 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.
📜 License
This project is licensed under the MIT License. See the LICENSE file for details.
⭐ Support the Project
If you find GoTagMate useful, consider giving it a ⭐ on GitHub!