A Go interface defines a set of method signatures — a contract of behavior. Crucially, interfaces are satisfied implicitly: any type that has those methods automatically satisfies the interface, with no explicit "implements" declaration. This structural, duck-typing approach is distinctive and powerful.
Defining and implicitly implementing an interface
Speaker {
Speak()
}
Dog {}
Speak() { }
Cat {}
Speak() { }
s Speaker = Dog{}
s.Speak()
