Comprehensive developer toolkit for building, testing, and managing Go (Golang) applications in Visual Studio Code.
Overview
Go Dev Toolkit accelerates Go development by providing one-click task management, automatic struct tag generation, pkg.go.dev package discovery, snippets, and an interactive concurrency cheat sheet directly within VS Code.
Features
Go Tasks & Module Explorer
A dedicated Sidebar in the Activity Bar for running essential Go tasks with a single click:
- Build & Run:
go run ., go build, go build -race, go doc
- Test & Benchmarks:
go test ./..., go test -race, go test -bench=., go test -cover
- Modules:
go mod tidy, go mod download, Search pkg.go.dev, go clean -modcache
- Code Quality:
go vet ./..., go fmt ./..., Add/Toggle Struct Tags
Go Struct Tag Generator
- Automatically generate or toggle
json:"...", yaml:"...", db:"...", gorm:"...", or xml:"..." tags on struct fields in the active editor.
- Configurable naming styles (
snake_case or camelCase).
Package & Module Assistant (pkg.go.dev)
- Search popular Go packages and libraries from the Command Palette or Sidebar.
- Install packages directly with
go get <package> in the integrated terminal.
- One-click copy of import declarations to clipboard.
- Direct links to official documentation on pkg.go.dev.
Interactive Go Cheat Sheet & Concurrency Patterns
Searchable reference panel covering core Go idioms:
- Concurrency & Goroutines:
sync.WaitGroup worker pools, Channel select with timeouts, sync.Mutex state protection.
- Context Management:
context.WithTimeout, cancellation listeners via ctx.Done().
- Error Handling: Error wrapping with
fmt.Errorf("%w"), sentinel checking with errors.Is and errors.As.
- Generics & Slices: Type-safe mapping, filtering, and slice utilities.
- Instant Copy and Insert into Editor actions.
Built-in Go Snippets
- Quick templates for main entrypoints (
main), struct definitions with tags (st), table-driven tests (tdt), HTTP handler functions (hf), and error check guards (ie).
- Displays active Go runtime version (
go version) in the status bar with quick access to common workflows.
Commands
| Command |
Title |
go-toolkit.openCheatSheet |
Go: Open Interactive Cheat Sheet |
go-toolkit.addJsonTags |
Go: Add/Toggle JSON Struct Tags |
go-toolkit.searchPackages |
Go: Search & Add Package (pkg.go.dev) |
go-toolkit.modTidy |
Go: Run 'go mod tidy' |
go-toolkit.runVet |
Go: Run 'go vet ./...' |
go-toolkit.runBenchmarks |
Go: Run Benchmarks (go test -bench=.) |
go-toolkit.runGoCommand |
Go: Run Go Task / Command... |
go-toolkit.refreshTaskView |
Refresh Go Tasks |
Extension Settings
| Setting |
Default |
Description |
goToolkit.showStatusBar |
true |
Show the active Go toolchain indicator in the status bar. |
goToolkit.structTagStyle |
snake_case |
Naming convention (snake_case or camelCase) for generated struct tags. |
License
MIT
| |