20 lines
372 B
Go
20 lines
372 B
Go
package exceptions
|
||
|
||
import "fmt"
|
||
|
||
type NotFoundError struct {
|
||
Message string
|
||
}
|
||
|
||
func NewNotFoundError(msg string) *NotFoundError {
|
||
return &NotFoundError{Message: msg}
|
||
}
|
||
|
||
func NewNotFoundErrorFromError(msg string, err error) *NotFoundError {
|
||
return &NotFoundError{Message: fmt.Sprintf("%s,%v", msg, err)}
|
||
}
|
||
|
||
func (e NotFoundError) Error() string {
|
||
return e.Message
|
||
}
|