summaryrefslogtreecommitdiff
path: root/api/server/httputils
diff options
context:
space:
mode:
authorDaniel Nephin <dnephin@docker.com>2017-09-11 14:55:05 -0400
committerDaniel Nephin <dnephin@docker.com>2017-09-12 12:09:59 -0400
commitf7f101d57ef8cbf2d8723a18b7d723c5c5dd04b6 (patch)
tree2544c185b48fcbf10bd924e92338b3a1654a2489 /api/server/httputils
parent969b76d85f93e214cbc44f25a3f44b67cb0dc078 (diff)
downloaddocker-f7f101d57ef8cbf2d8723a18b7d723c5c5dd04b6.tar.gz
Add gosimple linter
Update gometalinter Signed-off-by: Daniel Nephin <dnephin@docker.com>
Diffstat (limited to 'api/server/httputils')
-rw-r--r--api/server/httputils/write_log_stream.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/api/server/httputils/write_log_stream.go b/api/server/httputils/write_log_stream.go
index fd024e196e..e90e610da6 100644
--- a/api/server/httputils/write_log_stream.go
+++ b/api/server/httputils/write_log_stream.go
@@ -17,20 +17,13 @@ import (
// WriteLogStream writes an encoded byte stream of log messages from the
// messages channel, multiplexing them with a stdcopy.Writer if mux is true
-func WriteLogStream(ctx context.Context, w io.Writer, msgs <-chan *backend.LogMessage, config *types.ContainerLogsOptions, mux bool) {
+func WriteLogStream(_ context.Context, w io.Writer, msgs <-chan *backend.LogMessage, config *types.ContainerLogsOptions, mux bool) {
wf := ioutils.NewWriteFlusher(w)
defer wf.Close()
wf.Flush()
- // this might seem like doing below is clear:
- // var outStream io.Writer = wf
- // however, this GREATLY DISPLEASES golint, and if you do that, it will
- // fail CI. we need outstream to be type writer because if we mux streams,
- // we will need to reassign all of the streams to be stdwriters, which only
- // conforms to the io.Writer interface.
- var outStream io.Writer
- outStream = wf
+ outStream := io.Writer(wf)
errStream := outStream
sysErrStream := errStream
if mux {