From 74a857d6abde8275cfdfea07eb757b1fe2c408c2 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sat, 12 Sep 2015 14:08:48 +0100 Subject: [PATCH] updates --- hugo.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hugo.go b/hugo.go index 420434b7..6a3aac64 100644 --- a/hugo.go +++ b/hugo.go @@ -14,21 +14,21 @@ func Setup(c *setup.Controller) (middleware.Middleware, error) { commands.Execute() return func(next middleware.Handler) middleware.Handler { - return &handler{} + return &handler{ + Next: next, + } }, nil } -type handler struct{} +type handler struct{ Next middleware.Handler } type adminHandler struct{} func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) { - // do path matching if middleware.Path(r.URL.Path).Matches("/admin") { a := new(adminHandler) return a.ServeHTTP(w, r) } - http.ServeFile(w, r, "public"+r.URL.Path) return 200, nil }