Archived
all: A few more interesting linter fixes (#5502)
A couple of minor bugs and simplifications
This commit is contained in:
1 parent
0b2cabbc31
commit
9fd270d78e
20 files changed
+55
-68
No files matched your search
@@ -231,9 +231,7 @@ func TestNoDelay(t *testing.T) {
|
||||
func getEventPaths(dir *eventDir, dirPath string, a *aggregator) []string {
|
||||
var paths []string
|
||||
for childName, childDir := range dir.dirs {
|
||||
for _, path := range getEventPaths(childDir, filepath.Join(dirPath, childName), a) {
|
||||
paths = append(paths, path)
|
||||
}
|
||||
paths = append(paths, getEventPaths(childDir, filepath.Join(dirPath, childName), a)...)
|
||||
}
|
||||
for name := range dir.events {
|
||||
paths = append(paths, filepath.Join(dirPath, name))
|
||||
@@ -264,9 +262,7 @@ func compareBatchToExpected(batch []string, expectedPaths []string) (missing []s
|
||||
missing = append(missing, expected)
|
||||
}
|
||||
}
|
||||
for _, received := range batch {
|
||||
unexpected = append(unexpected, received)
|
||||
}
|
||||
unexpected = append(unexpected, batch...)
|
||||
return missing, unexpected
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user