summaryrefslogtreecommitdiff
path: root/libpod/define/errors.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-12-17 14:46:15 +0100
committerPaul Holzinger <pholzing@redhat.com>2022-01-12 17:07:30 +0100
commit495884b3195de482dc610a2a002db7e053188a32 (patch)
tree2a6f23db066cd52aa366991b0b34d7b919368ddc /libpod/define/errors.go
parent2cdab5d53923784e72020d70ee9375518f19f9b6 (diff)
downloadpodman-495884b3195de482dc610a2a002db7e053188a32.tar.gz
podman-495884b3195de482dc610a2a002db7e053188a32.tar.bz2
podman-495884b3195de482dc610a2a002db7e053188a32.zip
use libnetwork from c/common
The libpod/network packages were moved to c/common so that buildah can use it as well. To prevent duplication use it in podman as well and remove it from here. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/define/errors.go')
-rw-r--r--libpod/define/errors.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/libpod/define/errors.go b/libpod/define/errors.go
index 9fd210eed..653ef187d 100644
--- a/libpod/define/errors.go
+++ b/libpod/define/errors.go
@@ -3,6 +3,8 @@ package define
import (
"errors"
"fmt"
+
+ "github.com/containers/common/libnetwork/types"
)
var (
@@ -16,7 +18,7 @@ var (
ErrNoSuchVolume = errors.New("no such volume")
// ErrNoSuchNetwork indicates the requested network does not exist
- ErrNoSuchNetwork = errors.New("network not found")
+ ErrNoSuchNetwork = types.ErrNoSuchNetwork
// ErrNoSuchExecSession indicates that the requested exec session does
// not exist.
@@ -48,7 +50,7 @@ var (
ErrExecSessionExists = errors.New("exec session already exists")
// ErrNetworkExists indicates that a network with the given name already
// exists.
- ErrNetworkExists = errors.New("network already exists")
+ ErrNetworkExists = types.ErrNetworkExists
// ErrCtrStateInvalid indicates a container is in an improper state for
// the requested operation
@@ -73,7 +75,7 @@ var (
ErrVolumeFinalized = errors.New("volume has been finalized")
// ErrInvalidArg indicates that an invalid argument was passed
- ErrInvalidArg = errors.New("invalid argument")
+ ErrInvalidArg = types.ErrInvalidArg
// ErrEmptyID indicates that an empty ID was passed
ErrEmptyID = errors.New("name or ID cannot be empty")