Browse Source

Merge pull request #10266 from bobrik/no-extra-assertion

Not doing extra assertion for io.Closer
Jessie Frazelle 10 years ago
parent
commit
c77c67cf87
1 changed files with 1 additions and 6 deletions
  1. 1 6
      pkg/chrootarchive/diff.go

+ 1 - 6
pkg/chrootarchive/diff.go

@@ -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