Ensure that we are closing files.

This commit is contained in:
Piotr Skamruk
2016-09-06 09:58:22 +02:00
parent ff1cec99cc
commit dc3674c8d0
5 changed files with 6 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ func readBytesFromFile(t *testing.T, filename string) []byte {
if err != nil {
t.Fatal(err)
}
defer file.Close()
data, err := ioutil.ReadAll(file)
if err != nil {