aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-02-11 22:28:35 +0100
committerPaul Holzinger <paul.holzinger@web.de>2021-02-11 23:01:49 +0100
commit69ab67bf90aa4bbd285f360e3bca4c85b6028908 (patch)
tree3ab90163357d9d85aedae6555934ae5744b4ac83 /pkg/domain/infra
parentef2fc90f2d0057bfddee1b83d307e853181a4988 (diff)
downloadpodman-69ab67bf90aa4bbd285f360e3bca4c85b6028908.tar.gz
podman-69ab67bf90aa4bbd285f360e3bca4c85b6028908.tar.bz2
podman-69ab67bf90aa4bbd285f360e3bca4c85b6028908.zip
Enable golint linter
Use the golint linter and fix the reported problems. [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/abi/containers_stat.go4
-rw-r--r--pkg/domain/infra/abi/images.go7
2 files changed, 5 insertions, 6 deletions
diff --git a/pkg/domain/infra/abi/containers_stat.go b/pkg/domain/infra/abi/containers_stat.go
index f3d0799a0..1844f4019 100644
--- a/pkg/domain/infra/abi/containers_stat.go
+++ b/pkg/domain/infra/abi/containers_stat.go
@@ -35,7 +35,7 @@ func (ic *ContainerEngine) containerStat(container *libpod.Container, containerM
// ENOENT let's the API handlers return the correct status code
// which is crucial for the remote client.
if os.IsNotExist(err) || strings.Contains(statInfoErr.Error(), "o such file or directory") {
- statInfoErr = copy.ENOENT
+ statInfoErr = copy.ErrENOENT
}
// If statInfo is nil, there's nothing we can do anymore. A
// non-nil statInfo may indicate a symlink where we must have
@@ -129,7 +129,7 @@ func secureStat(root string, path string) (*buildahCopiah.StatForItem, error) {
stat, exists := globStats[0].Results[glob] // only one glob passed, so that's okay
if !exists {
- return nil, copy.ENOENT
+ return nil, copy.ErrENOENT
}
var statErr error
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index f2d0f2c39..cf108ba9c 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -40,10 +40,9 @@ func (ir *ImageEngine) Exists(_ context.Context, nameOrID string) (*entities.Boo
if err != nil {
if errors.Cause(err) == define.ErrMultipleImages {
return &entities.BoolReport{Value: true}, nil
- } else {
- if errors.Cause(err) != define.ErrNoSuchImage {
- return nil, err
- }
+ }
+ if errors.Cause(err) != define.ErrNoSuchImage {
+ return nil, err
}
}
return &entities.BoolReport{Value: err == nil}, nil