@samber/golang-structs-interfaces

Golang 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.

View in AI SkillSafe app
34981 downloads
0 stars
0 demos
SKILL.md

Embed badges

Add these to your README to show the skill's verification status.

SkillSafe verified badge
Verified badge
[![SkillSafe verified badge](https://api.skillsafe.ai/v1/badge/@samber/golang-structs-interfaces/verified)](https://skillsafe.ai/skill/@samber/golang-structs-interfaces/)
Installs badge
Installs badge
[![Installs badge](https://api.skillsafe.ai/v1/badge/@samber/golang-structs-interfaces/installs)](https://skillsafe.ai/skill/@samber/golang-structs-interfaces/)
Scan badge
Scan badge
[![Scan badge](https://api.skillsafe.ai/v1/badge/@samber/golang-structs-interfaces/scan)](https://skillsafe.ai/skill/@samber/golang-structs-interfaces/)
Eval pass rate badge
Eval pass rate
[![Eval pass rate badge](https://api.skillsafe.ai/v1/badge/@samber/golang-structs-interfaces/eval)](https://skillsafe.ai/skill/@samber/golang-structs-interfaces/)