smithery/JamesPrial

go-vet

Fix go vet warnings

Installation

$ npx skills add smithery/JamesPrial --skill go-vet

Also in this package

Other skills from smithery/JamesPrial · top by installs.

npx skills add smithery/JamesPrial

Browse all from smithery/JamesPrial

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,014 B
  • docs SUMMARY.md 33 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

go vet

Built-in static analyzer that catches common mistakes.

Usage

go vet ./...
go vet ./pkg/...

Common Warnings

Printf Format Mismatch

// Bad
fmt.Printf("%d", "string")

// Good
fmt.Printf("%s", "string")

Unreachable Code

// Bad
return value
fmt.Println("never runs")

// Good
fmt.Println("runs")
return value

Composite Literal Uses Unkeyed Fields

// Bad
Person{"Alice", 30}

// Good
Person{Name: "Alice", Age: 30}

Nil Dereference

// Bad
var p *int
fmt.Println(*p)

// Good
if p != nil {
    fmt.Println(*p)
}

Suspicious Mutex Usage

// Bad - mutex copied
func process(mu sync.Mutex) {
    mu.Lock()
}

// Good - pass pointer
func process(mu *sync.Mutex) {
    mu.Lock()
}

Lost Context

// Bad
ctx := context.TODO()

// Good
ctx := context.Background()
// or accept ctx as parameter

Fix All Issues

go vet ./... 2>&1 | tee vet.log