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 <julius.volz@gmail.com>
This commit is contained in:
parent
684484ef49
commit
710588f10f
|
@ -183,9 +183,6 @@ func (r *Route) Key() string {
|
|||
// Walk traverses the route tree in depth-first order.
|
||||
func (r *Route) Walk(visit func(*Route)) {
|
||||
visit(r)
|
||||
if r.Routes == nil {
|
||||
return
|
||||
}
|
||||
for i := range r.Routes {
|
||||
r.Routes[i].Walk(visit)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue