errors.go 674 B

12345678910111213141516171819202122232425262728
  1. package query
  2. import (
  3. "github.com/leonelquinteros/gotext"
  4. )
  5. // ErrAURSearch means that it was not possible to connect to the AUR.
  6. type ErrAURSearch struct {
  7. inner error
  8. }
  9. func (e ErrAURSearch) Error() string {
  10. return gotext.Get("Error during AUR search: %s\n", e.inner.Error())
  11. }
  12. // ErrInvalidSortMode means that the sort mode provided was not valid.
  13. type ErrInvalidSortMode struct{}
  14. func (e ErrInvalidSortMode) Error() string {
  15. return gotext.Get("invalid sort mode. Fix with yay -Y --bottomup --save")
  16. }
  17. // ErrNoQuery means that query was not executed.
  18. type ErrNoQuery struct{}
  19. func (e ErrNoQuery) Error() string {
  20. return gotext.Get("no query was executed")
  21. }