]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Missing Close
authorMatt Joiner <anacrolix@gmail.com>
Fri, 22 Aug 2014 07:40:10 +0000 (17:40 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 22 Aug 2014 07:40:10 +0000 (17:40 +1000)
testutil/testutil.go

index f3616b6a7c4c73c10f8538432a2eee7bbc102c16..e4b606080853d91be9e4d8e4e86112a57f5f93e0 100644 (file)
@@ -19,6 +19,7 @@ const GreetingFileContents = "hello, world\n"
 
 func CreateDummyTorrentData(dirName string) string {
        f, _ := os.Create(filepath.Join(dirName, "greeting"))
+       defer f.Close()
        f.WriteString("hello, world\n")
        return f.Name()
 }