.opencode/commands/go-build.md
Fix Go build, vet, and compilation errors: $ARGUMENTS
go build ./...go vet ./...imported and not used: "package"
Fix: Remove unused import or use _ prefix
cannot use x (type T) as type U
Fix: Add type conversion or fix type definition
undefined: identifier
Fix: Import package, define variable, or fix typo
printf: call has arguments but no formatting directives
Fix: Add format directive or remove arguments
# 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
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.