From 710588f10f4c66906e1a0dc28257e807b4d22924 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Mon, 2 May 2022 16:29:04 +0200 Subject: [PATCH] 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 --- dispatch/route.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/dispatch/route.go b/dispatch/route.go index 643aa6da..4b3673c5 100644 --- a/dispatch/route.go +++ b/dispatch/route.go @@ -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) }