]> Sergey Matveev's repositories - btrtrc.git/commitdiff
util/dirwatch: Some tidying
authorMatt Joiner <anacrolix@gmail.com>
Wed, 3 Dec 2014 18:10:29 +0000 (12:10 -0600)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 3 Dec 2014 18:10:29 +0000 (12:10 -0600)
util/dirwatch/dirwatch.go
util/dirwatch/dirwatch_test.go

index b01e56302a53a73baaf40623f9c787593aaae0ec..cbe2026a8297bd6ca0392bb2c5e7ce34c4dbea22 100644 (file)
@@ -9,9 +9,8 @@ import (
        "path/filepath"
        "strings"
 
-       "bitbucket.org/anacrolix/go.torrent/util"
-
        "bitbucket.org/anacrolix/go.torrent"
+       "bitbucket.org/anacrolix/go.torrent/util"
        "github.com/anacrolix/libtorgo/metainfo"
        "github.com/go-fsnotify/fsnotify"
 )
index 7a975702fa652ba1167345f2b7931e38e72c486f..40d68ff7730b990c64d0c0bee5e2aa87bf076614 100644 (file)
@@ -12,9 +12,10 @@ func TestDirwatch(t *testing.T) {
                t.Fatal(err)
        }
        defer os.RemoveAll(tempDirName)
+       t.Logf("tempdir: %q", tempDirName)
        dw, err := New(tempDirName)
+       defer dw.Close()
        if err != nil {
                t.Fatal(err)
        }
-       dw.Close()
 }