define handlers, routes

This commit is contained in:
Tim Möhlmann 2023-09-13 19:13:53 +03:00
parent fe3f98a4f9
commit 81d42b061d
3 changed files with 143 additions and 37 deletions

View file

@ -218,6 +218,11 @@ func NewRedirect(url string) *Redirect {
return &Redirect{URL: url}
}
func (red *Redirect) writeOut(w http.ResponseWriter, r *http.Request) {
gu.MapMerge(r.Header, w.Header())
http.Redirect(w, r, red.URL, http.StatusFound)
}
type UnimplementedServer struct{}
// UnimplementedStatusCode is the statuscode returned for methods