A Real-World Example of Go Interfaces
How to implement Go interfaces and why they’re awesome
Nov 6 · 2 min read

Suppose I’m building a web app in Go. In my app, I want to send a message to my users. I can send a message to the users via email or SMS. This would be a perfect use case for interfaces.
For this hypothetical web app, I create the following main.go file.


