utf8s.RuneReader
parent
5bbcb5d54a
commit
f81ca5284f
|
@ -8,5 +8,6 @@ var (
|
|||
errInternalError = errors.New("Internal Error")
|
||||
errInvalidUTF8 = internalInvalidUTF8Complainer{}
|
||||
errNilReader = internalNilReaderComplainer{}
|
||||
errNilReceiver = errors.New("Nil Receiver")
|
||||
errNilWriter = internalNilWriterComplainer{}
|
||||
)
|
||||
|
|
|
@ -16,6 +16,10 @@ func NewRuneReader(reader io.Reader) *RuneReader {
|
|||
}
|
||||
|
||||
func (receiver *RuneReader) ReadRune() (rune, int, error) {
|
||||
if nil == receiver {
|
||||
return 0, 0, errNilReceiver
|
||||
}
|
||||
|
||||
reader := receiver.reader
|
||||
if nil == reader {
|
||||
return 0, 0, errNilReader
|
||||
|
|
Loading…
Reference in New Issue