summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-04-22 11:51:53 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-04-22 12:51:29 +0200
commit2a8e435671186bead0e02b13f55e118724175cce (patch)
treec5e39d30702560528d6a340ef1daf7b145be8534 /libpod/runtime_ctr.go
parent56d6ee0808d30c96289568724d748a0e85008638 (diff)
downloadpodman-2a8e435671186bead0e02b13f55e118724175cce.tar.gz
podman-2a8e435671186bead0e02b13f55e118724175cce.tar.bz2
podman-2a8e435671186bead0e02b13f55e118724175cce.zip
enable staticcheck linter
Fix many problems reported by the staticcheck linter, including many real bugs! Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 7edd49fd1..a62c2b607 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -397,6 +397,10 @@ func (r *Runtime) setupContainer(ctx context.Context, ctr *Container) (_ *Contai
if ctr.restoreFromCheckpoint {
// Remove information about bind mount
// for new container from imported checkpoint
+
+ // NewFromSpec() is deprecated according to its comment
+ // however the recommended replace just causes a nil map panic
+ //nolint:staticcheck
g := generate.NewFromSpec(ctr.config.Spec)
g.RemoveMount("/dev/shm")
ctr.config.ShmDir = ""