Skip to content

Instantly share code, notes, and snippets.

Created December 26, 2019 22:35
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save L04DB4L4NC3R/42c6d8fdc9885666707e1cc680b213f0 to your computer and use it in GitHub Desktop.
Clean arch
package errors
import (
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