remove ServerTask in router
This commit is contained in:
parent
7d4b31074d
commit
477718dd2f
2 changed files with 1 additions and 13 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -0,0 +1 @@
|
|||
testData/userDB.ndtl
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue