I find the author's particular problem utterly baffling from either direction. When presented with io.Reader's specification:
type Reader interface {
Read(p []byte) (n int, err error)
}
It should be obvious to any modestly experienced developer that an ordinary file object is likely to satisfy the requirement of having a common Read method.This seems like a basic failure to understand what a Go interface is, nevermind any understanding of the standard library.