From 00b3caecbbdc29c1e5e7705714e8a6f4e4b191d7 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Wed, 22 Jan 2020 14:51:22 -0500 Subject: [PATCH] ci: enable staticcheck, fix problems that were surfaced (#2809) --- pkg/watch/notify_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/watch/notify_test.go b/pkg/watch/notify_test.go index 5e71fcd8c..0b7697d99 100644 --- a/pkg/watch/notify_test.go +++ b/pkg/watch/notify_test.go @@ -42,7 +42,7 @@ func TestEventOrdering(t *testing.T) { count := 8 dirs := make([]string, count) - for i, _ := range dirs { + for i := range dirs { dir := f.TempDir("watched") dirs[i] = dir f.watch(dir) @@ -74,7 +74,7 @@ func TestGitBranchSwitch(t *testing.T) { count := 10 dirs := make([]string, count) - for i, _ := range dirs { + for i := range dirs { dir := f.TempDir("watched") dirs[i] = dir f.watch(dir) @@ -656,7 +656,7 @@ func (f *notifyFixture) fsyncWithRetryCount(retryCount int) { anySyncPath := filepath.Join(f.paths[0], "sync-") timeout := time.After(250 * time.Millisecond) - f.WriteFile(syncPath, fmt.Sprintf("%s", time.Now())) + f.WriteFile(syncPath, time.Now().String()) F: for { @@ -700,11 +700,11 @@ func (f *notifyFixture) closeWatcher() { // drain channels from watcher go func() { - for _ = range notify.Events() { + for range notify.Events() { } }() go func() { - for _ = range notify.Errors() { + for range notify.Errors() { } }() }