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 /pkg/logs | |
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 'pkg/logs')
-rw-r--r-- | pkg/logs/logs.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/logs/logs.go b/pkg/logs/logs.go index 0f684750e..89e4e5686 100644 --- a/pkg/logs/logs.go +++ b/pkg/logs/logs.go @@ -30,6 +30,7 @@ import ( "github.com/containers/libpod/libpod" "github.com/containers/libpod/libpod/define" + "github.com/containers/libpod/pkg/errorhandling" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -153,7 +154,7 @@ func ReadLogs(logPath string, ctr *libpod.Container, opts *LogOptions) error { if err != nil { return errors.Wrapf(err, "failed to open log file %q", logPath) } - defer file.Close() + defer errorhandling.CloseQuiet(file) msg := &logMessage{} opts.bytes = -1 @@ -161,9 +162,9 @@ func ReadLogs(logPath string, ctr *libpod.Container, opts *LogOptions) error { reader := bufio.NewReader(file) if opts.Follow { - followLog(reader, writer, opts, ctr, msg, logPath) + err = followLog(reader, writer, opts, ctr, msg, logPath) } else { - dumpLog(reader, writer, opts, msg, logPath) + err = dumpLog(reader, writer, opts, msg, logPath) } return err } |