mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 13:43:26 +08:00
1.5 KiB
1.5 KiB
description, agent, subtask
| description | agent | subtask |
|---|---|---|
| Fix Go build and vet errors | go-build-resolver | true |
Go Build Command
Fix Go build, vet, and compilation errors: $ARGUMENTS
Your Task
- Run go build:
go build ./... - Run go vet:
go vet ./... - Fix errors one by one
- Verify fixes don't introduce new errors
Common Go Errors
Import Errors
imported and not used: "package"
Fix: Remove unused import or use _ prefix
Type Errors
cannot use x (type T) as type U
Fix: Add type conversion or fix type definition
Undefined Errors
undefined: identifier
Fix: Import package, define variable, or fix typo
Vet Errors
printf: call has arguments but no formatting directives
Fix: Add format directive or remove arguments
Fix Order
- Import errors - Fix or remove imports
- Type definitions - Ensure types exist
- Function signatures - Match parameters
- Vet warnings - Address static analysis
Build Commands
# Build all packages
go build ./...
# Build with race detector
go build -race ./...
# Build for specific OS/arch
GOOS=linux GOARCH=amd64 go build ./...
# Run go vet
go vet ./...
# Run staticcheck
staticcheck ./...
# Format code
gofmt -w .
# Tidy dependencies
go mod tidy
Verification
After fixes:
go build ./... # Should succeed
go vet ./... # Should have no warnings
go test ./... # Tests should pass
IMPORTANT: Fix errors only. No refactoring, no improvements. Get the build green with minimal changes.