go-eol/unrecognizedeol.go

26 lines
498 B
Go
Raw Normal View History

2023-11-29 18:18:09 +00:00
package eol
import (
"fmt"
)
var _ error = internalUnrecognizedEOLError{}
type internalUnrecognizedEOLError struct {
value string
}
func errUnrecognizedEOL(value string) error {
return internalUnrecognizedEOLError{
value:value,
}
}
func (receiver internalUnrecognizedEOLError) Error() string {
return fmt.Sprintf("eol: %q is an unrecognized end-of-line (EOL) sequence", receiver.value)
}
func (receiver internalUnrecognizedEOLError) UnrecognizedEOL() string {
return receiver.value
}