link-go/errors/errors.go
2021-03-15 19:03:30 +06:00

25 lines
358 B
Go

package errors
type NotFoundError struct {
Message string
}
func (err NotFoundError) Error() string {
return err.Message
}
type UnknownError struct {
Err error
}
func (err UnknownError) Error() string {
return err.Err.Error()
}
type AlreadyExistsError struct {
Message string
}
func (err AlreadyExistsError) Error() string {
return err.Message
}