Skip to content

Commit 00b3cae

Browse files
Dan Millerndeloof
authored andcommitted
ci: enable staticcheck, fix problems that were surfaced (docker#2809)
1 parent 1708744 commit 00b3cae

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/watch/notify_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestEventOrdering(t *testing.T) {
4242

4343
count := 8
4444
dirs := make([]string, count)
45-
for i, _ := range dirs {
45+
for i := range dirs {
4646
dir := f.TempDir("watched")
4747
dirs[i] = dir
4848
f.watch(dir)
@@ -74,7 +74,7 @@ func TestGitBranchSwitch(t *testing.T) {
7474

7575
count := 10
7676
dirs := make([]string, count)
77-
for i, _ := range dirs {
77+
for i := range dirs {
7878
dir := f.TempDir("watched")
7979
dirs[i] = dir
8080
f.watch(dir)
@@ -656,7 +656,7 @@ func (f *notifyFixture) fsyncWithRetryCount(retryCount int) {
656656
anySyncPath := filepath.Join(f.paths[0], "sync-")
657657
timeout := time.After(250 * time.Millisecond)
658658

659-
f.WriteFile(syncPath, fmt.Sprintf("%s", time.Now()))
659+
f.WriteFile(syncPath, time.Now().String())
660660

661661
F:
662662
for {
@@ -700,11 +700,11 @@ func (f *notifyFixture) closeWatcher() {
700700

701701
// drain channels from watcher
702702
go func() {
703-
for _ = range notify.Events() {
703+
for range notify.Events() {
704704
}
705705
}()
706706
go func() {
707-
for _ = range notify.Errors() {
707+
for range notify.Errors() {
708708
}
709709
}()
710710
}

0 commit comments

Comments
 (0)