initial commits

master
Charles Iliya Krempeaux 2023-11-27 06:47:38 -08:00
parent 1fc5dc884c
commit efcad45cd1
1 changed files with 21 additions and 0 deletions

21
errors.go 100644
View File

@ -0,0 +1,21 @@
package eol
import (
"sourcecode.social/reiver/go-erorr"
)
const (
errNilRuneScanner = erorr.Error("eol: nil rune-scanner")
)
func errNotEOL(r rune) error {
return erorr.Errorf("eol: %q (%U) is not an end-of-line character", r, r)
}
func errProblemReadingRune(err error, runeNumber uint64) error {
return erorr.Errorf("eol: problem reading rune №%d of end-of-line sequence: %w", runeNumber, err)
}
func errProblemUnreadingRune(err error, runeNumber uint64, r rune) error {
return erorr.Errorf("eol: problem unreading rune №%d (%q (%U)) of end-of-line sequence: %w", runeNumber, r, r, err)
}