Interfaces
An interface type is defined as a set of method signatures.
A value of interface type can hold any value that implements those methods.
Under the hood, interface values can be thought of as a tuple of a value and a concrete type:
(value, type)
Empty Interface
Empty interfaces are used by code that handles values of unknown type. For example, fmt.Print
takes any number of arguments of type interface{}
.