Not doing extra assertion for io.Closer

Signed-off-by: Ian Babrou <ibobrik@gmail.com>
This commit is contained in:
Ian Babrou 2015-01-22 10:36:20 +03:00
parent feb02197c1
commit eec1af54d1

View file

@ -5,7 +5,6 @@ import (
"encoding/json"
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
@ -60,11 +59,7 @@ func ApplyLayer(dest string, layer archive.ArchiveReader) (size int64, err error
return 0, err
}
defer func() {
if c, ok := decompressed.(io.Closer); ok {
c.Close()
}
}()
defer decompressed.Close()
cmd := reexec.Command("docker-applyLayer", dest)
cmd.Stdin = decompressed