Dec 28, 2024
"This is because Go interfaces are for CONSUMERS and not CREATORS"
Like this. You also add an example of how consumers/clients are still testable (unit test) after returning Concrete objects instead of interface types.
"This is because Go interfaces are for CONSUMERS and not CREATORS"
Like this. You also add an example of how consumers/clients are still testable (unit test) after returning Concrete objects instead of interface types.
Engineer | Trainer | writes about Practical Software Engineering | Find me on linkedin.com/in/leangaurav | Discuss anything topmate.io/leangaurav