aboutsummaryrefslogtreecommitdiff
path: root/libpod/define
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-07-31 17:17:56 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-07-31 17:17:56 -0400
commite3ced7217f8c60de7faf1ad7d741709d8a255e95 (patch)
tree32fb6c77799aa697c3c47f4e11711b1eaff458e6 /libpod/define
parent7a15be546adffe4f884abfbd4ed02f69ac7659e0 (diff)
downloadpodman-e3ced7217f8c60de7faf1ad7d741709d8a255e95.tar.gz
podman-e3ced7217f8c60de7faf1ad7d741709d8a255e95.tar.bz2
podman-e3ced7217f8c60de7faf1ad7d741709d8a255e95.zip
Ensure libpod/define does not include libpod/image
The define package under Libpod is intended to be an extremely minimal package, including constants and very little else. However, as a result of some legacy code, it was dragging in all of libpod/image (and, less significantly, the util package). Fortunately, this was just to ensure that error constants were not duplicating, and there's nothing preventing us from importing in the other direction and keeping libpod/define free of dependencies. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/define')
-rw-r--r--libpod/define/errors.go13
1 files changed, 5 insertions, 8 deletions
diff --git a/libpod/define/errors.go b/libpod/define/errors.go
index 23d10f527..4a0df3983 100644
--- a/libpod/define/errors.go
+++ b/libpod/define/errors.go
@@ -2,23 +2,20 @@ package define
import (
"errors"
-
- "github.com/containers/podman/v2/libpod/image"
- "github.com/containers/podman/v2/utils"
)
var (
// ErrNoSuchCtr indicates the requested container does not exist
- ErrNoSuchCtr = image.ErrNoSuchCtr
+ ErrNoSuchCtr = errors.New("no such container")
// ErrNoSuchPod indicates the requested pod does not exist
- ErrNoSuchPod = image.ErrNoSuchPod
+ ErrNoSuchPod = errors.New("no such pod")
// ErrNoSuchImage indicates the requested image does not exist
- ErrNoSuchImage = image.ErrNoSuchImage
+ ErrNoSuchImage = errors.New("no such image")
// ErrNoSuchTag indicates the requested image tag does not exist
- ErrNoSuchTag = image.ErrNoSuchTag
+ ErrNoSuchTag = errors.New("no such tag")
// ErrNoSuchVolume indicates the requested volume does not exist
ErrNoSuchVolume = errors.New("no such volume")
@@ -76,7 +73,7 @@ var (
// ErrDetach indicates that an attach session was manually detached by
// the user.
- ErrDetach = utils.ErrDetach
+ ErrDetach = errors.New("detached from container")
// ErrWillDeadlock indicates that the requested operation will cause a
// deadlock. This is usually caused by upgrade issues, and is resolved