From 477718dd2f824dbd8129db8e5b2b0acabaaf7397 Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Sat, 8 Jan 2022 13:50:27 -0700 Subject: [PATCH] remove ServerTask in router --- .gitignore | 1 + router/router.go | 13 ------------- 2 files changed, 1 insertion(+), 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) }