mirror of
https://github.com/containers/podman.git
synced 2025-10-27 19:34:13 +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:
@ -16,7 +16,6 @@ import (
|
||||
"github.com/containers/podman/v2/libpod"
|
||||
"github.com/containers/podman/v2/libpod/define"
|
||||
"github.com/containers/podman/v2/libpod/image"
|
||||
image2 "github.com/containers/podman/v2/libpod/image"
|
||||
"github.com/containers/podman/v2/pkg/api/handlers"
|
||||
"github.com/containers/podman/v2/pkg/api/handlers/utils"
|
||||
"github.com/containers/podman/v2/pkg/auth"
|
||||
@ -524,7 +523,7 @@ func CommitContainer(w http.ResponseWriter, r *http.Request) {
|
||||
utils.Error(w, "failed to get runtime config", http.StatusInternalServerError, errors.Wrap(err, "failed to get runtime config"))
|
||||
return
|
||||
}
|
||||
sc := image2.GetSystemContext(rtc.Engine.SignaturePolicyPath, "", false)
|
||||
sc := image.GetSystemContext(rtc.Engine.SignaturePolicyPath, "", false)
|
||||
tag := "latest"
|
||||
options := libpod.ContainerCommitOptions{
|
||||
Pause: true,
|
||||
|
||||
Reference in New Issue
Block a user