errgroup: remove redundant len check (#2354)

`len(g.children) > 0` is redundant because `range` already skips empty
slice.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
Eng Zer Jun 2024-04-25 06:13:03 +08:00 committed by GitHub
parent 4e90cd4e4d
commit df7737ed57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -330,11 +330,9 @@ func isNotNil(err error) bool {
return true
}
if len(g.children) > 0 {
for _, child := range g.children {
if isNotNil(child) {
return true
}
for _, child := range g.children {
if isNotNil(child) {
return true
}
}