
The implementations for the storage of metadata have been merged into a single metadata package where they can share storage primitives and techniques. The is a requisite for the addition of namespaces, which will require a coordinated layout for records to be organized by namespace. Signed-off-by: Stephen J Day <stephen.day@docker.com>
18 lines
372 B
Go
18 lines
372 B
Go
package metadata
|
|
|
|
import "github.com/pkg/errors"
|
|
|
|
var (
|
|
ErrExists = errors.New("metadata: exists")
|
|
ErrNotFound = errors.New("metadata: not found")
|
|
)
|
|
|
|
// IsNotFound returns true if the error is due to a missing image.
|
|
func IsNotFound(err error) bool {
|
|
return errors.Cause(err) == ErrNotFound
|
|
}
|
|
|
|
func IsExists(err error) bool {
|
|
return errors.Cause(err) == ErrExists
|
|
}
|