summaryrefslogtreecommitdiff
path: root/gemini.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-09-17 14:00:03 -0600
committertjpcc <tjp@ctrl-c.club>2023-09-17 14:00:03 -0600
commitce0def95f3924a10b0faceb72aa5df18bf813fb1 (patch)
tree2f0300d84738343ea2fb9f13db1af1e649b41917 /gemini.go
parentebea6fe755fb052b79cbe05b6280611337e1e5f6 (diff)
GOPHER
Diffstat (limited to 'gemini.go')
-rw-r--r--gemini.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/gemini.go b/gemini.go
index e6e936f..7e106b7 100644
--- a/gemini.go
+++ b/gemini.go
@@ -32,8 +32,8 @@ func GeminiRouter(repodir string, overrides *template.Template) *sliderule.Route
repoRouter.Route("/tags", gmiTemplate(tmpl, "tag_list.gmi"))
repoRouter.Route("/refs/:ref/", gmiTemplate(tmpl, "ref.gmi"))
repoRouter.Route("/refs/:ref/tree/*path", geminiTreePath(tmpl))
- repoRouter.Route("/diffstat/:fromref/:toref", runTemplate(tmpl, "diffstat.gmi", "text/plain"))
- repoRouter.Route("/diff/:fromref/:toref", runTemplate(tmpl, "diff.gmi", "text/x-diff"))
+ repoRouter.Route("/diffstat/:fromref/:toref", runGemiTemplate(tmpl, "diffstat.gmi", "text/plain"))
+ repoRouter.Route("/diff/:fromref/:toref", runGemiTemplate(tmpl, "diff.gmi", "text/x-diff"))
router := &sliderule.Router{}
router.Route("/", geminiRoot(repodir, tmpl))
@@ -104,10 +104,10 @@ func geminiTreePath(tmpl *template.Template) sliderule.Handler {
}
func gmiTemplate(tmpl *template.Template, name string) sliderule.Handler {
- return runTemplate(tmpl, name, "text/gemini; charset=utf-8")
+ return runGemiTemplate(tmpl, name, "text/gemini; charset=utf-8")
}
-func runTemplate(tmpl *template.Template, name, mimetype string) sliderule.Handler {
+func runGemiTemplate(tmpl *template.Template, name, mimetype string) sliderule.Handler {
return sliderule.HandlerFunc(func(ctx context.Context, request *sliderule.Request) *sliderule.Response {
obj := map[string]any{
"Ctx": ctx,