error.go 383 B

1234567891011121314151617181920212223
  1. package store
  2. import (
  3. "fmt"
  4. )
  5. type NotFoundError string
  6. func (e NotFoundError) Error() string {
  7. return fmt.Sprintf("Key %s Not Found", string(e))
  8. }
  9. type NotFile string
  10. func (e NotFile) Error() string {
  11. return fmt.Sprintf("Try to set value to a dir %s", string(e))
  12. }
  13. type TestFail string
  14. func (e TestFail) Error() string {
  15. return fmt.Sprintf("Test %s fails", string(e))
  16. }