errors.go 576 B

123456789101112131415161718192021222324252627282930
  1. package settings
  2. import (
  3. "fmt"
  4. "github.com/leonelquinteros/gotext"
  5. )
  6. type ErrPrivilegeElevatorNotFound struct {
  7. confValue string
  8. }
  9. func (e *ErrPrivilegeElevatorNotFound) Error() string {
  10. return fmt.Sprintf("unable to find a privilege elevator, config value: %s", e.confValue)
  11. }
  12. type ErrRuntimeDir struct {
  13. inner error
  14. dir string
  15. }
  16. func (e *ErrRuntimeDir) Error() string {
  17. return gotext.Get("failed to create directory '%s': %s", e.dir, e.inner)
  18. }
  19. type ErrUserAbort struct{}
  20. func (e ErrUserAbort) Error() string {
  21. return gotext.Get("aborting due to user")
  22. }