Go Project CLAUDE.md Template
CLAUDE.md for Go/Golang backend services
Category:templates
Type:template
Difficulty:intermediate
Language:Markdown
go
api
intermediate
Description
Comprehensive CLAUDE.md template for Go projects. Covers project layout, dependency management with Go modules, testing patterns, common libraries (Gin, Echo, GORM), and deployment considerations.
Content
Resource Content
# Go Project ## Overview Go backend service using standard library and popular frameworks. ## Tech Stack - Language: Go 1.22+ - Web: Gin/Chi/Echo - Database: PostgreSQL + sqlc/GORM - Config: Viper ## Key Commands ```bash go run ./cmd/server # Run server go build ./cmd/server # Build binary go test ./... # Run all tests go test -v -cover ./... # With coverage go mod tidy # Clean deps golangci-lint run # Lint code ``` ## Project Structure ``` / ├── cmd/ │ └── server/ │ └── main.go # Entry point ├── internal/ │ ├── api/ # HTTP handlers │ ├── domain/ # Business logic │ ├── repository/ # Data access │ └── config/ # Configuration ├── pkg/ # Public packages ├── migrations/ # SQL migrations └── go.mod # Dependencies ``` ## Conventions - Use `internal/` for private packages - Interface-driven design - Error wrapping with context - Structured logging (zerolog/zap) ## Important Notes - Use context.Context for cancellation - Graceful shutdown handling - Use sqlc for type-safe SQL
Rate This Resource
0
Help others discover great resources
Statistics
0
Stars
0
Copies
404
Days ago
575
Views
Related Resources
⚡
Django CLAUDE.md Template
CLAUDE.md for Django web applications
⚡
Python FastAPI CLAUDE.md Template
Complete CLAUDE.md for FastAPI backend projects
⚡
Node.js Express CLAUDE.md Template
Battle-tested CLAUDE.md for Express.js API projects
⚡
Next.js CLAUDE.md Template
Comprehensive CLAUDE.md for Next.js App Router projects