Skip to content

Commit 710588f

Browse files
authored
Remove unneeded nil check before ranging over slice (#2900)
Ranging over a nil slice is just a noop as well. Signed-off-by: Julius Volz <[email protected]>
1 parent 684484e commit 710588f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

dispatch/route.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ func (r *Route) Key() string {
183183
// Walk traverses the route tree in depth-first order.
184184
func (r *Route) Walk(visit func(*Route)) {
185185
visit(r)
186-
if r.Routes == nil {
187-
return
188-
}
189186
for i := range r.Routes {
190187
r.Routes[i].Walk(visit)
191188
}

0 commit comments

Comments
 (0)