mirror of https://github.com/docker/compose.git
ci: enable staticcheck, fix problems that were surfaced (#2809)
This commit is contained in:
parent
17087447e9
commit
00b3caecbb
|
@ -42,7 +42,7 @@ func TestEventOrdering(t *testing.T) {
|
||||||
|
|
||||||
count := 8
|
count := 8
|
||||||
dirs := make([]string, count)
|
dirs := make([]string, count)
|
||||||
for i, _ := range dirs {
|
for i := range dirs {
|
||||||
dir := f.TempDir("watched")
|
dir := f.TempDir("watched")
|
||||||
dirs[i] = dir
|
dirs[i] = dir
|
||||||
f.watch(dir)
|
f.watch(dir)
|
||||||
|
@ -74,7 +74,7 @@ func TestGitBranchSwitch(t *testing.T) {
|
||||||
|
|
||||||
count := 10
|
count := 10
|
||||||
dirs := make([]string, count)
|
dirs := make([]string, count)
|
||||||
for i, _ := range dirs {
|
for i := range dirs {
|
||||||
dir := f.TempDir("watched")
|
dir := f.TempDir("watched")
|
||||||
dirs[i] = dir
|
dirs[i] = dir
|
||||||
f.watch(dir)
|
f.watch(dir)
|
||||||
|
@ -656,7 +656,7 @@ func (f *notifyFixture) fsyncWithRetryCount(retryCount int) {
|
||||||
anySyncPath := filepath.Join(f.paths[0], "sync-")
|
anySyncPath := filepath.Join(f.paths[0], "sync-")
|
||||||
timeout := time.After(250 * time.Millisecond)
|
timeout := time.After(250 * time.Millisecond)
|
||||||
|
|
||||||
f.WriteFile(syncPath, fmt.Sprintf("%s", time.Now()))
|
f.WriteFile(syncPath, time.Now().String())
|
||||||
|
|
||||||
F:
|
F:
|
||||||
for {
|
for {
|
||||||
|
@ -700,11 +700,11 @@ func (f *notifyFixture) closeWatcher() {
|
||||||
|
|
||||||
// drain channels from watcher
|
// drain channels from watcher
|
||||||
go func() {
|
go func() {
|
||||||
for _ = range notify.Events() {
|
for range notify.Events() {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
for _ = range notify.Errors() {
|
for range notify.Errors() {
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue