/go-review Command
This command invokes the go-reviewer agent for comprehensive Go-specific code review.What This Command Does
- Identify Go Changes: Find modified
.gofiles viagit diff - Run Static Analysis: Execute
go vet,staticcheck,golangci-lint - Security Scan: Check for SQL injection, command injection, race conditions
- Concurrency Review: Analyze goroutine safety, channel usage, mutex patterns
- Idiomatic Go Check: Verify code follows Go conventions and best practices
- Generate Report: Categorize issues by severity
When to Use
Use/go-review when:
- After writing or modifying Go code
- Before committing Go changes
- Reviewing pull requests with Go code
- Onboarding to a new Go codebase
- Learning idiomatic Go patterns
Review Categories
CRITICAL (Must Fix)
- SQL/Command injection vulnerabilities
- Race conditions without synchronization
- Goroutine leaks
- Hardcoded credentials
- Unsafe pointer usage
- Ignored errors in critical paths
HIGH (Should Fix)
- Missing error wrapping with context
- Panic instead of error returns
- Context not propagated
- Unbuffered channels causing deadlocks
- Interface not satisfied errors
- Missing mutex protection
MEDIUM (Consider)
- Non-idiomatic code patterns
- Missing godoc comments on exports
- Inefficient string concatenation
- Slice not preallocated
- Table-driven tests not used
Automated Checks Run
Command Syntax
Approval Criteria
| Status | Condition |
|---|---|
| ✅ Approve | No CRITICAL or HIGH issues |
| ⚠️ Warning | Only MEDIUM issues (merge with caution) |
| ❌ Block | CRITICAL or HIGH issues found |
Related
- Agent:
agents/go-reviewer.md - Skills:
skills/golang-patterns/,skills/golang-testing/ - Commands:
/go-test,/go-build,/code-review