From 972d8518e9bd83b0992d76f2d79c1c2583c06904 Mon Sep 17 00:00:00 2001 From: Eric Herbrandson Date: Thu, 20 Sep 2018 14:07:56 -0500 Subject: [PATCH] Leaving a comment in iPrefixMatcher per PR comments --- route/matcher.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/route/matcher.go b/route/matcher.go index e1e817641..4cdbbbbe2 100644 --- a/route/matcher.go +++ b/route/matcher.go @@ -27,6 +27,8 @@ func globMatcher(uri string, r *Route) bool { // iPrefixMatcher matches path to the routes' path ignoring case func iPrefixMatcher(uri string, r *Route) bool { + // todo(fs): if this turns out to be a performance issue we should cache + // todo(fs): strings.ToLower(r.Path) in r.PathLower lowerURI := strings.ToLower(uri) lowerPath := strings.ToLower(r.Path) return strings.HasPrefix(lowerURI, lowerPath)