From 170e4d2e19258c4e45b975177618640cb554c32b Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Thu, 8 May 2014 12:57:19 -0700 Subject: [PATCH] Cast Input and Output to closer Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) --- engine/streams.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/streams.go b/engine/streams.go index 48f031de8f..6cc10d346d 100644 --- a/engine/streams.go +++ b/engine/streams.go @@ -118,7 +118,7 @@ func (o *Output) Close() error { defer o.Unlock() var firstErr error for _, dst := range o.dests { - if closer, ok := dst.(io.WriteCloser); ok { + if closer, ok := dst.(io.Closer); ok { err := closer.Close() if err != nil && firstErr == nil { firstErr = err @@ -154,7 +154,7 @@ func (i *Input) Read(p []byte) (n int, err error) { // Not thread safe on purpose func (i *Input) Close() error { if i.src != nil { - if closer, ok := i.src.(io.WriteCloser); ok { + if closer, ok := i.src.(io.Closer); ok { return closer.Close() } }