mirror of
https://github.com/kataras/iris.git
synced 2026-01-09 21:15:56 +00:00
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:
@@ -330,13 +330,11 @@ func isNotNil(err error) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(g.children) > 0 {
|
|
||||||
for _, child := range g.children {
|
for _, child := range g.children {
|
||||||
if isNotNil(child) {
|
if isNotNil(child) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user