Interface segregation: payment methods
Let each client declare an interface with only the methods it calls, so no implementation has to fake the rest.
Level Intermediate
What you will see
- Four jobs, one interface
- Methods nobody calls
- Each client declares what it needs
- One struct, several roles
- How small is too small
Before / after
Base: interface-segregation-base-goView the diff