2 Commits

Author SHA1 Message Date
4f269d0f29 fixed error template as template 2023-07-14 20:35:11 +02:00
e344b5973a implemented Buffered method 2023-07-14 18:36:14 +02:00

View File

@ -47,6 +47,10 @@ func (r *Reader) Rune() (rune, error) {
return rn, err
}
func (r *Reader) Buffered() int {
return r.src.Buffered()
}
// PeekRune returns the next rune in r without advancing reader position.
// The next read will return the same rune again.
func (r *Reader) PeekRune() (rune, error) {
@ -243,7 +247,7 @@ func (r *Reader) ExpectOneOfString(str ...string) (string, error) {
}
}
return "", ErrNoMatchFound
return "", ErrNoMatchFound.New()
}
// Commit clears the internal buffer and therefore removes all data which were already read.