summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--main.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/main.go b/main.go
index ec164fb..b987ef2 100644
--- a/main.go
+++ b/main.go
@@ -41,7 +41,6 @@ func main() {
func finalHandler(w http.ResponseWriter, r *http.Request) {
p := r.Context().Value(middleware.PrinterKey).(i18n.Printer)
- ctx := context.WithValue(context.Background(), templates.PrinterKey, p)
path := r.URL.Path
if path != "/" && path[len(path)-1] == '/' {
@@ -53,7 +52,7 @@ func finalHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, p.T("Page not found"))
} else {
w.WriteHeader(http.StatusOK)
- templates.Root(nil, c).Render(ctx, w)
+ templates.Root(nil, c).Render(r.Context(), w)
}
}