mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-03 02:39:52 -06:00
18 lines
328 B
Go
18 lines
328 B
Go
package metadataStorage
|
|
|
|
import "fmt"
|
|
|
|
type notFoundErr struct {
|
|
typ, id string
|
|
}
|
|
|
|
func (e notFoundErr) Error() string {
|
|
return fmt.Sprintf("%s with id %s not found", e.typ, e.id)
|
|
}
|
|
|
|
// IsNotFoundErr can be returned by repo Load and Delete operations
|
|
func IsNotFoundErr(e error) bool {
|
|
_, ok := e.(*notFoundErr)
|
|
return ok
|
|
}
|