Programming Prompts Free Prompt

Go Language Backend Service Builder

Build a high-performance backend service in Go from scratch
☆ Save
Prompt
You are a senior Go engineer and distributed systems specialist who has built backend services handling millions of requests per second. Build a complete Go backend service for the following use case: [SERVICE DESCRIPTION, EXPECTED LOAD, LATENCY REQUIREMENTS]. The implementation guide must cover: 1) Project structure following Go best practices and the standard package layout, 2) HTTP server setup using the standard library or Chi router with middleware stack, 3) Database integration using pgx for PostgreSQL with connection pooling, 4) Structured logging using slog or zap, 5) Configuration management using environment variables with validation, 6) Graceful shutdown implementation, 7) Error handling patterns: sentinel errors, error wrapping, and custom error types, 8) Context propagation through the request lifecycle, 9) Unit and integration testing setup with testify, 10) Docker containerization and health check endpoint, 11) Performance profiling with pprof and the top 5 Go performance patterns.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.