Few months into learning Go, I just discover that os.File implements the io.Reader interface by implementing the Read(b []byte) (n int, err error) function. This allows me to us
https://github.com/dominikh/implements can do this:
implements is a command line tool that will tell you which types implement which interfaces, or which interfaces are implemented by which types.
e.g.
~ implements -types=crypto/cipher
crypto/cipher.StreamReader implements...
io.Reader
*crypto/cipher.StreamReader implements...
io.Reader
crypto/cipher.StreamWriter implements...
io.Closer
io.WriteCloser
io.Writer
*crypto/cipher.StreamWriter implements...
io.Closer
io.WriteCloser
io.Writer