A type satisfies an interface if it possesses all the methods
the interface requires.
For example, an
ReadWriter, but does not satisfy
because it does not have a
As a shorthand, Go programmers often say that a concrete type “is a”
particular interface type, meaning that it satisfies the interface.
For example, a
*bytes.Buffer is an
*os.File is an
The assignability rule (§2.4.2) for interfaces is very simple: an expression may be assigned to an interface only if its type satisfies the interface. So:
var w io.Writer w = os.Stdout ...