From b081308884cb01d235336c900f65dc0a638f08c8 Mon Sep 17 00:00:00 2001 From: tjp Date: Tue, 14 Nov 2023 21:48:48 -0700 Subject: minor optimization for git routes --- gopher.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gopher.go') diff --git a/gopher.go b/gopher.go index ecef9c0..a52f05d 100644 --- a/gopher.go +++ b/gopher.go @@ -108,9 +108,8 @@ func addGopherCGIRoute(router *sr.Router, route RouteDirective) { func addGopherGitRoute(router *sr.Router, route RouteDirective) { buildAndAddRoute(router, route, func(route RouteDirective) sr.Handler { + subrouter := syw.GopherRouter(route.FsPath, route.Modifiers.Templates) return sr.HandlerFunc(func(ctx context.Context, request *sr.Request) *sr.Response { - subrouter := syw.GopherRouter(route.FsPath, route.Modifiers.Templates) - reqclone := cloneRequest(request) reqclone.Path = strings.TrimPrefix(reqclone.Path, route.URLPath) -- cgit v1.2.3