Go Interfaces

Enforces Go interface design — interfaces defined by the consumer, kept to one or two methods, accepted as parameters while structs are returned, and never created before a second implementation exists. Use when writing or reviewing Go abstractions, mocks, or package boundaries, and when the user mentions interface design, mocking, dependency injection, "accept interfaces return structs", io.Reader, io.Writer, generics vs interfaces, or asks "should this be an interface", "how do I test this dependency".

CasLubbers Updated

File contents

CasLubbers/code-design-skills/tree/main/skills/go-interfaces commit a5c444db94

Frequently asked questions

npx skillmds@latest add caslubbers/go-interfaces