Interfaces in Go allow us to treat different types as the same data type temporarily because both types implement the same *kind *of behavior.
Writing clean interfaces is hard. Frankly, anytime you’re dealing with abstractions in code, the simple can become complex very quickly if you’re not careful. Let’s go over some rules of thumb for keeping interfaces clean.
- Keep interfaces small
- Interfaces should have no knowledge of satisfying types
- Interfaces are not classes
https://blog.boot.dev/golang/golang-interfaces/