aboutsummaryrefslogtreecommitdiff
path: root/libpod/service.go
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@redhat.com>2022-07-05 11:42:22 +0200
committerSascha Grunert <sgrunert@redhat.com>2022-07-05 16:06:32 +0200
commit251d91699de4e9aaab53ab6fea262d4b6bdaae8e (patch)
tree1995c85a69f48bf129565ca60ea0b3d6205a04b4 /libpod/service.go
parent340eeed0cb20855f1e6d2670704cfe67df3314f6 (diff)
downloadpodman-251d91699de4e9aaab53ab6fea262d4b6bdaae8e.tar.gz
podman-251d91699de4e9aaab53ab6fea262d4b6bdaae8e.tar.bz2
podman-251d91699de4e9aaab53ab6fea262d4b6bdaae8e.zip
libpod: switch to golang native error wrapping
We now use the golang error wrapping format specifier `%w` instead of the deprecated github.com/pkg/errors package. [NO NEW TESTS NEEDED] Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Diffstat (limited to 'libpod/service.go')
-rw-r--r--libpod/service.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/service.go b/libpod/service.go
index c14f5e51d..a8928277f 100644
--- a/libpod/service.go
+++ b/libpod/service.go
@@ -2,10 +2,10 @@ package libpod
import (
"context"
+ "errors"
"fmt"
"github.com/containers/podman/v4/libpod/define"
- "github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -29,7 +29,7 @@ func (p *Pod) hasServiceContainer() bool {
func (p *Pod) serviceContainer() (*Container, error) {
id := p.config.ServiceContainerID
if id == "" {
- return nil, errors.Wrap(define.ErrNoSuchCtr, "pod has no service container")
+ return nil, fmt.Errorf("pod has no service container: %w", define.ErrNoSuchCtr)
}
return p.runtime.state.Container(id)
}