Go's io
package contains (among others) the following interfaces:
type ByteReader interface {
ReadByte() (c byte, err error)
}
type ByteScanner interface {
ByteReader
UnreadByte() error
}
type ByteWriter interface {
WriteByte(c byte) error
}
type RuneReader interface {
ReadRune() (r rune, size int, err error)
}
type RuneScanner interface {
RuneReader
UnreadRune() error
}
But there is no RuneWriter
interface:
type RuneWriter interface {
WriteRune(r rune) (size int, err error)
}
Is there a reason that RuneWriter
is missing?