All the types we’ve looked at so far have been concrete types.
type specifies the exact representation of its values and exposes the
intrinsic operations of that representation, such as arithmetic for
numbers, or indexing,
range for slices. A concrete
type may also provide additional behaviors through its methods.
When you have a value of a concrete type, you know exactly what it
is and what you can do with it.
There is another kind of type in Go called an interface type. An interface is an abstract type. It doesn’t expose the representation or internal structure of its values, or the set of basic operations they support; it reveals only some of their methods. When you have a value of ...