Introduction: Interfaces — Go’s Secret Weapon
I’ve watched teams create 20-method interfaces that become impossible to test, mock, or maintain. Then they wonder why Go feels clunky. “Accept interfaces, return structs” — if you’ve heard only one Go idiom, it’s probably this one. But why is it so important? And why are single-method interfaces the norm in Go, not the exception?
Common interface mistakes I’ve encountered: