diff options
author | baude <bbaude@redhat.com> | 2019-07-08 13:20:17 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2019-07-10 15:52:17 -0500 |
commit | e053e0e05ecd884067125627f0006d1b6e19226e (patch) | |
tree | 9e5bcca7703a041b23c2e3c9fcfe928e8bca2962 /cmd/podman/pod_create.go | |
parent | 81e722d08617ee19235bf57de6d86124e6b4574a (diff) | |
download | podman-e053e0e05ecd884067125627f0006d1b6e19226e.tar.gz podman-e053e0e05ecd884067125627f0006d1b6e19226e.tar.bz2 podman-e053e0e05ecd884067125627f0006d1b6e19226e.zip |
first pass of corrections for golangci-lint
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/pod_create.go')
-rw-r--r-- | cmd/podman/pod_create.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/pod_create.go b/cmd/podman/pod_create.go index 0abf84756..b6154b4db 100644 --- a/cmd/podman/pod_create.go +++ b/cmd/podman/pod_create.go @@ -8,6 +8,7 @@ import ( "github.com/containers/libpod/cmd/podman/shared" "github.com/containers/libpod/libpod/define" "github.com/containers/libpod/pkg/adapter" + "github.com/containers/libpod/pkg/errorhandling" "github.com/containers/libpod/pkg/util" "github.com/pkg/errors" "github.com/sirupsen/logrus" @@ -56,7 +57,6 @@ func init() { flags.StringVar(&podCreateCommand.Share, "share", shared.DefaultKernelNamespaces, "A comma delimited list of kernel namespaces the pod will share") } - func podCreateCmd(c *cliconfig.PodCreateValues) error { var ( err error @@ -67,7 +67,7 @@ func podCreateCmd(c *cliconfig.PodCreateValues) error { if err != nil { return errors.Wrapf(err, "error creating libpod runtime") } - defer runtime.Shutdown(false) + defer runtime.DeferredShutdown(false) if len(c.Publish) > 0 { if !c.Infra { @@ -86,8 +86,8 @@ func podCreateCmd(c *cliconfig.PodCreateValues) error { if err != nil { return errors.Errorf("error opening pod-id-file %s", c.PodIDFile) } - defer podIdFile.Close() - defer podIdFile.Sync() + defer errorhandling.CloseQuiet(podIdFile) + defer errorhandling.SyncQuiet(podIdFile) } labels, err := shared.GetAllLabels(c.LabelFile, c.Labels) |