errors.go 357 B

123456789101112131415161718
  1. package roles
  2. import "fmt"
  3. // InvalidListFilter is returned by the ToUserListQuery method when validation of
  4. // a filter does not pass
  5. type InvalidListFilter struct {
  6. FilterName string
  7. }
  8. func (e InvalidListFilter) Error() string {
  9. s := fmt.Sprintf(
  10. "Invalid filter name [%s]: it must be in format of NAME__COMPARATOR",
  11. e.FilterName,
  12. )
  13. return s
  14. }