Removed unused methods from HTTP server.
This commit is contained in:
parent
007ab59c81
commit
e03a0e320e
@ -32,18 +32,6 @@ func (s *HttpServer) GET(path string, handler http.HandlerFunc) {
|
|||||||
s.router.Handler(http.MethodGet, path, handler)
|
s.router.Handler(http.MethodGet, path, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *HttpServer) POST(path string, handler http.HandlerFunc) {
|
|
||||||
s.router.Handler(http.MethodPost, path, handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *HttpServer) ServeStatic(path string, fsys http.FileSystem) {
|
|
||||||
s.router.ServeFiles(path, fsys)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *HttpServer) SetNotFoundHandler(handler http.HandlerFunc) {
|
|
||||||
s.router.NotFound = handler
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetURLParam wrapper around underlying router for getting URL parameters.
|
// GetURLParam wrapper around underlying router for getting URL parameters.
|
||||||
func GetURLParam(r *http.Request, param string) string {
|
func GetURLParam(r *http.Request, param string) string {
|
||||||
return httprouter.ParamsFromContext(r.Context()).ByName(param)
|
return httprouter.ParamsFromContext(r.Context()).ByName(param)
|
||||||
|
Loading…
Reference in New Issue
Block a user