Reused errdefs define error

Signed-off-by: yanggang <gang.yang@daocloud.io>
This commit is contained in:
yanggang
2022-12-27 11:09:23 +08:00
parent 3fefb98f99
commit b10536d64f
2 changed files with 13 additions and 11 deletions

View File

@@ -26,6 +26,7 @@ import (
"fmt"
"strconv"
"github.com/containerd/containerd/errdefs"
bolt "go.etcd.io/bbolt"
)
@@ -50,9 +51,9 @@ var (
var (
// ErrNotFound represents an error returned when object not found in meta store
ErrNotFound = errors.New("not found")
ErrNotFound = errdefs.ErrNotFound
// ErrAlreadyExists represents an error returned when object can't be duplicated in meta store
ErrAlreadyExists = errors.New("object already exists")
ErrAlreadyExists = errdefs.ErrAlreadyExists
)
// PoolMetadata keeps device info for the given thin-pool device, generates next available device ids,