Interfaces
Go Interfaces: The Type System Feature You Implement By Accident
reading time: 9 minutes
You write a struct with a Write method. Three months later, you discover it implements io.Writer. You never declared this. How did it happen? Exploring Go’s implicit interfaces and the power of accidental implementation.