login page

This commit is contained in:
Nazar Kanaev
2020-11-03 21:54:55 +00:00
parent 94d1659ad5
commit 0e2da62081
5 changed files with 104 additions and 3 deletions

View File

@@ -9,6 +9,12 @@ type Route struct {
url string
urlRegex *regexp.Regexp
handler func(http.ResponseWriter, *http.Request)
skipAuth bool
}
func (r Route) SkipAuth() Route {
r.skipAuth = true
return r
}
func p(path string, handler func(http.ResponseWriter, *http.Request)) Route {