summaryrefslogtreecommitdiff
path: root/server.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-02-11 13:51:21 +0100
committerxengineering <me@xengineering.eu>2023-02-11 13:51:21 +0100
commit06a09ecebb3e7631044963e374671edf15d61213 (patch)
treed9dafb315cc25a22766fe369b597420d2992f264 /server.go
parent6b52b4bbc81c64b29daff043b83e21c38f332052 (diff)
downloadceres-06a09ecebb3e7631044963e374671edf15d61213.tar
ceres-06a09ecebb3e7631044963e374671edf15d61213.tar.zst
ceres-06a09ecebb3e7631044963e374671edf15d61213.zip
Make multiplexer regular handlers
Multiplexer functions used to return closures which are able to handle HTTP requests for historc reasons. Now the multiplexers can be regular HTTP handlers which is simpler.
Diffstat (limited to 'server.go')
-rw-r--r--server.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/server.go b/server.go
index d70373b..f565636 100644
--- a/server.go
+++ b/server.go
@@ -8,13 +8,13 @@ import (
func setupRoutes() {
- http.HandleFunc("/", indexMux())
- http.HandleFunc("/recipe", recipeMux())
- http.HandleFunc("/recipe/edit", recipeEditMux())
- http.HandleFunc("/recipe/image", recipeImageMux())
- http.HandleFunc("/add_recipes", addRecipesMux())
- http.HandleFunc("/static/style.css", staticStyleMux())
- http.HandleFunc("/favicon.ico", faviconMux())
+ http.HandleFunc("/", indexMux)
+ http.HandleFunc("/recipe", recipeMux)
+ http.HandleFunc("/recipe/edit", recipeEditMux)
+ http.HandleFunc("/recipe/image", recipeImageMux)
+ http.HandleFunc("/add_recipes", addRecipesMux)
+ http.HandleFunc("/static/style.css", staticStyleMux)
+ http.HandleFunc("/favicon.ico", faviconMux)
}
func runServer() {