1
0

Removed unused methods from HTTP server.

This commit is contained in:
Alexander Andreev 2022-12-17 21:50:18 +04:00
parent 007ab59c81
commit e03a0e320e
Signed by: Arav
GPG Key ID: 0388CC8FAA51063F

View File

@ -32,18 +32,6 @@ func (s *HttpServer) GET(path string, handler http.HandlerFunc) {
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.
func GetURLParam(r *http.Request, param string) string {
return httprouter.ParamsFromContext(r.Context()).ByName(param)