all: Even more boring linter fixes (#5501)

This commit is contained in:
Jakob Borg
2019-02-02 11:45:17 +01:00
committed by GitHub
parent df5c1eaf01
commit 0b2cabbc31
28 changed files with 131 additions and 104 deletions

View File

@@ -216,7 +216,7 @@ func TestNormalization(t *testing.T) {
if fd, err := testFs.OpenFile(filepath.Join("normalization", s1, s2), os.O_CREATE|os.O_EXCL, 0644); err != nil {
t.Fatal(err)
} else {
fd.Write([]byte("test"))
_, _ = fd.Write([]byte("test"))
fd.Close()
}
}
@@ -257,7 +257,7 @@ func TestIssue1507(t *testing.T) {
f := make(chan ScanResult, 100)
fn := w.walkAndHashFiles(context.TODO(), h, f)
fn("", nil, protocol.ErrClosed)
_ = fn("", nil, protocol.ErrClosed)
}
func TestWalkSymlinkUnix(t *testing.T) {
@@ -268,9 +268,9 @@ func TestWalkSymlinkUnix(t *testing.T) {
// Create a folder with a symlink in it
os.RemoveAll("_symlinks")
os.Mkdir("_symlinks", 0755)
_ = os.Mkdir("_symlinks", 0755)
defer os.RemoveAll("_symlinks")
os.Symlink("../testdata", "_symlinks/link")
_ = os.Symlink("../testdata", "_symlinks/link")
fs := fs.NewFilesystem(fs.FilesystemTypeBasic, "_symlinks")
for _, path := range []string{".", "link"} {
@@ -298,7 +298,7 @@ func TestWalkSymlinkWindows(t *testing.T) {
// Create a folder with a symlink in it
name := "_symlinks-win"
os.RemoveAll(name)
os.Mkdir(name, 0755)
_ = os.Mkdir(name, 0755)
defer os.RemoveAll(name)
fs := fs.NewFilesystem(fs.FilesystemTypeBasic, name)
if err := osutil.DebugSymlinkForTestsOnly("../testdata", "_symlinks/link"); err != nil {