VS Code extension for gostructs - detect unused and duplicate structs in Go code.
- gostructs installed
go install github.com/gostructs/gostructs@latest- Detects unused structs in Go code
- Detects duplicate struct definitions
- Shows diagnostics in the Problems panel
- Runs automatically on file save
- Manual analysis via command palette
| Command | Description |
|---|---|
GoStructs: Run Analysis |
Run gostructs analysis |
GoStructs: Clear Diagnostics |
Clear all diagnostics |
| Setting | Default | Description |
|---|---|---|
gostructs.enable |
true |
Enable GoStructs extension |
gostructs.runOnSave |
true |
Run analysis automatically on file save |
gostructs.binaryPath |
"gostructs" |
Path to gostructs binary |
gostructs.severity |
"warning" |
Default diagnostic severity (error, warning, information, hint) |
BSD 3-Clause