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.

om-scogo 3c95f10 4 files · 39.5 KB Updated 0 repo stars

File contents

om-scogo/skillsh-scraper/tree/main/data/skills/samber-cc-skills-golang/golang-structs-interfaces commit 3c95f10e91

Frequently asked questions

npx skillmds add om-scogo/golang-structs-interfaces