I'm able to do this:
f, err := os.Create("file")
if err != nil {
....
}
by := bufio.NewWriter(f)
And this:
var _ io.Writer = &os.File{}
The package documentation for os.File leads to this source file which does contain an unexported write function but I get an error when I try to implement an interface with an unexported function.
var _ Disease = &Scratch{} // *Scratch doesn't implement Disease have spread() want Spread()
type Disease interface {
Spread()
}
type Scratch struct {
....
}
func (s* Scratch) spread() {
....
}
What am I missing ?
Update: os.File did need cleaning up