diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-12 13:15:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-12 13:15:35 -0500 |
commit | db5e7ec4c42adf8ff97d9b19116ab6dbcbb616cd (patch) | |
tree | a1afbf91732f4b20b2cbacb460a3b7b60d6b6919 /cmd/podman/system | |
parent | 0ccc88813e3e3a385ecdefbe971c1664193cd682 (diff) | |
parent | 8452b768ec96e84cd09766bddb65a34835844d6d (diff) | |
download | podman-db5e7ec4c42adf8ff97d9b19116ab6dbcbb616cd.tar.gz podman-db5e7ec4c42adf8ff97d9b19116ab6dbcbb616cd.tar.bz2 podman-db5e7ec4c42adf8ff97d9b19116ab6dbcbb616cd.zip |
Merge pull request #8947 from Luap99/cleanup-code
Fix problems reported by staticcheck
Diffstat (limited to 'cmd/podman/system')
-rw-r--r-- | cmd/podman/system/prune.go | 4 | ||||
-rw-r--r-- | cmd/podman/system/service.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/cmd/podman/system/prune.go b/cmd/podman/system/prune.go index 87bb947ed..5e96a654a 100644 --- a/cmd/podman/system/prune.go +++ b/cmd/podman/system/prune.go @@ -20,11 +20,11 @@ import ( var ( pruneOptions = entities.SystemPruneOptions{} filters []string - pruneDescription = fmt.Sprintf(` + pruneDescription = ` podman system prune Remove unused data -`) +` pruneCommand = &cobra.Command{ Use: "prune [options]", diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go index f8bdbfa10..f5760e172 100644 --- a/cmd/podman/system/service.go +++ b/cmd/podman/system/service.go @@ -80,7 +80,7 @@ func service(cmd *cobra.Command, args []string) error { } // socket activation uses a unix:// socket in the shipped unit files but apiURI is coded as "" at this layer. - if "unix" == uri.Scheme && !registry.IsRemote() { + if uri.Scheme == "unix" && !registry.IsRemote() { if err := syscall.Unlink(uri.Path); err != nil && !os.IsNotExist(err) { return err } |