error.go 372 B

1234567891011121314151617
  1. package utils
  2. import "strconv"
  3. // EscapeError Escape Error
  4. type EscapeError string
  5. func (e EscapeError) Error() string {
  6. return "invalid URL escape " + strconv.Quote(string(e))
  7. }
  8. // InvalidHostError Invalid Host Error
  9. type InvalidHostError string
  10. func (e InvalidHostError) Error() string {
  11. return "invalid character " + strconv.Quote(string(e)) + " in host name"
  12. }