golang-structs-interfaces
SolidGolang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON/YAML/DB serialization, or choosing between pointer and value receivers. Also use when the user asks about "accept interfaces, return structs", compile-time interface checks, or composing small interfaces into larger ones.
Install
Quality Score: 78/100
Skill Content
Details
- Author
- guynhsichngeodiec
- Repository
- guynhsichngeodiec/cc-skills-golang
- Created
- 3 months ago
- Last Updated
- yesterday
- Language
- Go
- License
- MIT
Similar Skills
Semantically similar based on skill content — not just same category
go
This skill should be used when the user works with Go files (.go), asks about "error handling", "interfaces", "goroutines", "channels", "packages", or discusses Go idioms and concurrency. Provides patterns for error handling, interface design, concurrency, and package organization.
golang-patterns
Idiomatic Go patterns, best practices, and conventions for building robust, efficient, and maintainable Go applications.
golang-patterns
Idiomatic Go patterns and conventions for robust, maintainable code. Use this skill whenever writing, reviewing, refactoring, or designing Go code — packages/modules, interfaces, error handling, concurrency (goroutines/channels/context), and project layout. Load it before the first line of Go, since idiom and error/concurrency conventions are hard to retrofit.