package main
import "io"
type MyClass struct{
writer *io.Writer
}
func (this *MyClass) WriteIt() {
this.writer.Write([]byte("Hello World!"))
}
Why is it that when writer, which is an implementation of io.Writer, tries to call the Write() function, displays me this error
this.writer.Write undefined (type *io.Writer has no field or method Write)