utf8s.RuneError
parent
578415cde8
commit
e15c86020c
|
@ -0,0 +1,9 @@
|
|||
package utf8s
|
||||
|
||||
import (
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
const (
|
||||
RuneError = utf8.RuneError
|
||||
)
|
|
@ -23,12 +23,12 @@ func NewRuneScanner(reader io.Reader) *RuneScanner {
|
|||
|
||||
func (receiver *RuneScanner) ReadRune() (rune, int, error) {
|
||||
if nil == receiver {
|
||||
return 0, 0, errNilReceiver
|
||||
return RuneError, 0, errNilReceiver
|
||||
}
|
||||
|
||||
reader := receiver.reader
|
||||
if nil == reader {
|
||||
return 0, 0, errNilReader
|
||||
return RuneError, 0, errNilReader
|
||||
}
|
||||
|
||||
if receiver.peeked {
|
||||
|
|
Loading…
Reference in New Issue