Interfaces

An interface is two things:

  • is a set of methods
  • but it's also a type

The interface{} type, the empty interface is the interface that has no methods.


type Talker interface {
    speak(string)
}
                        
interface.go