mirror of
https://github.com/containers/podman.git
synced 2025-10-18 19:53:58 +08:00
Fix problems reported by staticcheck
`staticcheck` is a golang code analysis tool. https://staticcheck.io/ This commit fixes a lot of problems found in our code. Common problems are: - unnecessary use of fmt.Sprintf - duplicated imports with different names - unnecessary check that a key exists before a delete call There are still a lot of reported problems in the test files but I have not looked at those. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
This commit is contained in:
@ -910,7 +910,7 @@ func WithUserNSFrom(nsCtr *Container) CtrCreateOption {
|
||||
ctr.config.UserNsCtr = nsCtr.ID()
|
||||
ctr.config.IDMappings = nsCtr.config.IDMappings
|
||||
|
||||
g := generate.NewFromSpec(ctr.config.Spec)
|
||||
g := generate.Generator{Config: ctr.config.Spec}
|
||||
|
||||
g.ClearLinuxUIDMappings()
|
||||
for _, uidmap := range nsCtr.config.IDMappings.UIDMap {
|
||||
|
Reference in New Issue
Block a user