go-architect
Installation
SKILL.md
Lead Go Architect
Quick Reference
| Topic | Reference |
|---|---|
| Flat vs modular project layout, migration signals | references/project-structure.md |
| Graceful shutdown with signal handling | references/graceful-shutdown.md |
| Dependency injection patterns, testing seams | references/dependency-injection.md |
Core Principles
- Standard library first -- Use
net/httpand the Go 1.22+ enhancedServeMuxfor routing. Only reach for a framework (chi, echo, gin) when you have a concrete need the stdlib cannot satisfy (e.g., complex middleware chains, regex routes). - Dependency injection over globals -- Pass databases, loggers, and services through struct fields and constructors, never package-level
var. - Explicit over magic -- No
init()side effects, no framework auto-wiring.main.gois the composition root where everything is assembled visibly. - Small interfaces, big structs -- Define interfaces at the consumer, keep them narrow (1-3 methods). Concrete types carry the implementation.