What problem does it solve?
This Skill unit provides guidance for writing clear, efficient, and maintainable Go applications by adhering to Go idioms and best practices.
Core Features & Use Cases
- Idiomatic Patterns: Offers Go patterns, including simplicity, zero value, and interfaces.
- Error Handling: Details patterns for error wrapping, custom error types, and error checking.
- Concurrency: Discusses worker pools, context cancellation, graceful shutdown, and errgroup usage.
- Interface Design: Suggests small, focused interfaces and embedding for composition.
- Package Organization: Provides guidelines on standard project layout and package naming.
- Struct Design: Recommends using the functional options pattern and embedding.
- Memory and Performance: Offers advice on preallocating slices and avoiding string concatenation in loops.
- Go Tooling Integration: Suggests essential commands for building, testing, and static analysis.
Quick Start
Activate the golang-patterns skill while reviewing your Go codebase to identify opportunities for improvement.