Interface allows you to create a type of a function that a function should/cloud accept as a param. It allows you to use different structs within your program and to make sure that they have correct methods attached.
General rules of interfaces
- Keep interfaces small
When implementing interfaces, make sure that they are as small as possible; don’t add unnecessary code to it - There should be no satisfying types
Avoid using types that are not neccessary.