diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-01-13 21:03:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-13 21:03:21 +0100 |
commit | 796ae87b1a3444557644944ddeb7cb37e303ef83 (patch) | |
tree | 192bd260c0b35519fe45ecbc91d7212251d82495 /pkg/adapter/runtime.go | |
parent | c1d93666d4b175be29a0ba229ee0b94d50765888 (diff) | |
parent | 768c476ae3c1dbf37204f5769b43746358af899d (diff) | |
download | podman-796ae87b1a3444557644944ddeb7cb37e303ef83.tar.gz podman-796ae87b1a3444557644944ddeb7cb37e303ef83.tar.bz2 podman-796ae87b1a3444557644944ddeb7cb37e303ef83.zip |
Merge pull request #4850 from vrothberg/fix-linting
Fix linting
Diffstat (limited to 'pkg/adapter/runtime.go')
-rw-r--r-- | pkg/adapter/runtime.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/adapter/runtime.go b/pkg/adapter/runtime.go index 121f85755..40089797d 100644 --- a/pkg/adapter/runtime.go +++ b/pkg/adapter/runtime.go @@ -407,7 +407,8 @@ func (r *LocalRuntime) Events(c *cliconfig.EventValues) error { } w := bufio.NewWriter(os.Stdout) for event := range eventChannel { - if c.Format == formats.JSONString { + switch { + case c.Format == formats.JSONString: jsonStr, err := event.ToJSONString() if err != nil { return errors.Wrapf(err, "unable to format json") @@ -415,11 +416,11 @@ func (r *LocalRuntime) Events(c *cliconfig.EventValues) error { if _, err := w.Write([]byte(jsonStr)); err != nil { return err } - } else if len(c.Format) > 0 { + case len(c.Format) > 0: if err := tmpl.Execute(w, event); err != nil { return err } - } else { + default: if _, err := w.Write([]byte(event.ToHumanReadable())); err != nil { return err } |