What problem does it solve?
This Skill provides robust, idiomatic, and scalable Go backend solutions, addressing the complexities of building high-performance web services.
Core Features & Use Cases
- HTTP Server Patterns: Demonstrates idiomatic
net/http usage with context cancellation, middleware, and graceful shutdown.
- Gin Framework Integration: Showcases best practices for using the Gin framework, including routing, middleware, and request validation.
- Database Interaction: Illustrates type-safe querying with GORM and sqlx, covering CRUD operations, transactions, and soft deletes.
- Concurrency Management: Implements common concurrency patterns like worker pools, fan-out/fan-in, and context-aware goroutines.
- Error Handling: Provides strategies for wrapping errors, defining custom error types, and implementing panic recovery.
- Testing Utilities: Includes examples of table-driven tests, benchmarks, and HTTP handler testing.
Quick Start
Use the golang-backend skill to generate a basic HTTP server using net/http with logging middleware.