diff options
author | Zach <zach.ramsay@gmail.com> | 2017-12-13 02:05:47 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-12-13 02:05:47 +0800 |
commit | 3da1bf8ca18f54d9bd2c8c110854dc071ee3898b (patch) | |
tree | 8346c96f35f065f098944e425baca74880965232 /swarm/fuse | |
parent | bbea4b2b53be53fc07b620c426bda80732a8814b (diff) | |
download | go-tangerine-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar go-tangerine-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar.gz go-tangerine-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar.bz2 go-tangerine-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar.lz go-tangerine-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar.xz go-tangerine-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.tar.zst go-tangerine-3da1bf8ca18f54d9bd2c8c110854dc071ee3898b.zip |
all: use gometalinter.v2, fix new gosimple issues (#15650)
Diffstat (limited to 'swarm/fuse')
-rw-r--r-- | swarm/fuse/swarmfs_test.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/swarm/fuse/swarmfs_test.go b/swarm/fuse/swarmfs_test.go index 93f1d4c2f..42af36345 100644 --- a/swarm/fuse/swarmfs_test.go +++ b/swarm/fuse/swarmfs_test.go @@ -95,7 +95,7 @@ func mountDir(t *testing.T, api *api.Api, files map[string]fileInfo, bzzHash str } // Test listMounts - if found == false { + if !found { t.Fatalf("Error getting mounts information for %v: %v", mountDir, err) } @@ -185,10 +185,8 @@ func isDirEmpty(name string) bool { defer f.Close() _, err = f.Readdirnames(1) - if err == io.EOF { - return true - } - return false + + return err == io.EOF } type testAPI struct { @@ -388,7 +386,7 @@ func (ta *testAPI) seekInMultiChunkFile(t *testing.T) { d.Read(contents) finfo := files["1.txt"] - if bytes.Compare(finfo.contents[:6024][5000:], contents) != 0 { + if !bytes.Equal(finfo.contents[:6024][5000:], contents) { t.Fatalf("File seek contents mismatch") } d.Close() |