Skip to content

Instantly share code, notes, and snippets.

@L04DB4L4NC3R
Created December 26, 2019 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save L04DB4L4NC3R/42c6d8fdc9885666707e1cc680b213f0 to your computer and use it in GitHub Desktop.
Save L04DB4L4NC3R/42c6d8fdc9885666707e1cc680b213f0 to your computer and use it in GitHub Desktop.
Clean arch
package errors
import (
"errors"
)
var (
ErrNotFound = errors.New("Error: Document not found")
ErrNoContent = errors.New("Error: Document not found")
ErrInvalidSlug = errors.New("Error: Invalid slug")
ErrExists = errors.New("Error: Document already exists")
ErrDatabase = errors.New("Error: Database error")
ErrUnauthorized = errors.New("Error: You are not allowed to perform this action")
ErrForbidden = errors.New("Error: Access to this resource is forbidden")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment