Interfaces in Golang
If you’re coming from Java, you definitely know about interfaces. If you’re coming from Python, you’re probably scratching your head. But, no matter which language you’re coming from, you’ll be surprised about how Go implements interfaces.
An interface is a type in Go. But, unlike the struct type, the interface type is not concerned with state, but with behavior.