Go 的io包包含(除其他外)以下接口:
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
}
但是没有RuneWriter界面:
type RuneWriter interface {
WriteRune(r rune) (size int, err error)
}
有RuneWriter没有缺少的原因?
慕婉清6462132
慕雪6442864
相关分类