According to “The Go Programming Language” an interface can be seen as a contract. A value that satisfies, say io.Writer, guarantees that there’s a Write method with a specific signature.
But am I right to assume that there is no guarantee as to what that method does? In the case of io.Writer, the Write method could just as well read from the p argument?
Effectively, yes. A value implements a given interface as long as it has methods with the correct names and signatures. Whether or not those methods actually do the expected thing has to be ensured by humans.