summaryrefslogtreecommitdiff
path: root/gemini.go
diff options
context:
space:
mode:
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,