Prompt Refactor

Go Interface Design

Design small, focused interfaces following Go conventions.

go
Insert label Interface Design
Prompt

Review and refactor interfaces in this Go code. Keep interfaces small (1-3 methods), define them at the consumer not the implementer, accept interfaces and return concrete structs. Extract implicit interfaces where a function only uses a subset of a type’s methods.

Add this to your Facet Inserts in Crystl for one-click access.

Get Crystl