From 2a8e435671186bead0e02b13f55e118724175cce Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Fri, 22 Apr 2022 11:51:53 +0200 Subject: enable staticcheck linter Fix many problems reported by the staticcheck linter, including many real bugs! Signed-off-by: Paul Holzinger --- libpod/options.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libpod/options.go') diff --git a/libpod/options.go b/libpod/options.go index ffd0e6037..4e597201a 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -936,6 +936,9 @@ func WithUserNSFrom(nsCtr *Container) CtrCreateOption { if err := JSONDeepCopy(nsCtr.IDMappings(), &ctr.config.IDMappings); err != nil { return err } + // 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.ClearLinuxUIDMappings() -- cgit v1.2.3-54-g00ecf