diff options
| author | tjp <tjp@ctrl-c.club> | 2023-11-14 21:48:48 -0700 |
|---|---|---|
| committer | tjp <tjp@ctrl-c.club> | 2023-11-14 21:48:48 -0700 |
| commit | b081308884cb01d235336c900f65dc0a638f08c8 (patch) | |
| tree | 6174e31ca0a4b03aab568c74591d35e8c9a2a29f /gopher.go | |
| parent | 04b5ba5d9d02a987e74d04bd61b6dc2c49c31a5d (diff) | |
minor optimization for git routes
Diffstat (limited to 'gopher.go')
| -rw-r--r-- | gopher.go | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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) |
