mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
enable staticcheck linter
Fix many problems reported by the staticcheck linter, including many real bugs! Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user