errors.go 258 B

123456789101112131415161718
  1. package readline
  2. import (
  3. "errors"
  4. )
  5. var (
  6. ErrInterrupt = errors.New("Interrupt")
  7. ErrNewLineDetected = errors.New("new line detected")
  8. )
  9. type InterruptError struct {
  10. Line []rune
  11. }
  12. func (*InterruptError) Error() string {
  13. return "Interrupted"
  14. }