mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
22 lines
368 B
Go
22 lines
368 B
Go
package gotsrpc
|
|
|
|
// Error type
|
|
type Error string
|
|
|
|
// Common errors
|
|
const (
|
|
ErrorNotFound Error = "notFound"
|
|
ErrorForbidden Error = "forbidden"
|
|
ErrorPermissionDenied Error = "permissionDenied"
|
|
)
|
|
|
|
// NewError returns a pointer error
|
|
func NewError(e Error) *Error {
|
|
return &e
|
|
}
|
|
|
|
// Error interface
|
|
func (e *Error) Error() string {
|
|
return string(*e)
|
|
}
|