aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2022-01-08 13:50:27 -0700
committerDerek Stevens <nilix@nilfm.cc>2022-01-08 13:51:25 -0700
commit477718dd2f824dbd8129db8e5b2b0acabaaf7397 (patch)
tree2dd964df21b1feda8d57ef8ccc8c2aad45cb7bdc
parent7d4b31074d077fc09ec6aace34c21813e3103364 (diff)
remove ServerTask in router
-rw-r--r--.gitignore1
-rw-r--r--router/router.go13
2 files changed, 1 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..97aaa08 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+testData/userDB.ndtl
diff --git a/router/router.go b/router/router.go
index f0ba53b..7bdaf8d 100644
--- a/router/router.go
+++ b/router/router.go
@@ -30,19 +30,6 @@ type Route struct {
handlerMap map[string]http.Handler
}
-/* This represents what the server should do with a given request. */
-type ServerTask struct {
- /* template and apiFmt are mutually exclusive. */
- template *template.Template
- apiFmt string
-
- /* doWork represents serverside work to fulfill the request.
- * This function can be composed any way you see fit when creating
- * a route.
- */
- doWork func(http.ResponseWriter, *http.Request)
-}
-
func (self *Router) Get(path string, h http.Handler) {
self.AddRoute("GET", path, h)
}