remove ServerTask in router

This commit is contained in:
Iris Lightshard 2022-01-08 13:50:27 -07:00
parent 7d4b31074d
commit 477718dd2f
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398
2 changed files with 1 additions and 13 deletions

1
.gitignore vendored
View file

@ -0,0 +1 @@
testData/userDB.ndtl

View file

@ -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)
}