Добавлены недостающие файлы

This commit is contained in:
Ганеев Артем
2025-11-22 15:27:23 +03:00
parent 83910be95d
commit 19e61e5ed9
5 changed files with 13 additions and 60 deletions

View File

@@ -10,10 +10,10 @@ type Server struct {
httpServer *http.Server
}
func (s *Server) Run(port string,handler http.Handler) error {
func (s *Server) Run(port string, handler http.Handler) error {
s.httpServer = &http.Server{
Addr: ":" + port,
Handler: handler,
Handler: handler,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
MaxHeaderBytes: 1 << 20,
@@ -21,7 +21,6 @@ func (s *Server) Run(port string,handler http.Handler) error {
return s.httpServer.ListenAndServe()
}
func (s *Server) Shutdown(ctx context.Context) error{
func (s *Server) Shutdown(ctx context.Context) error {
return s.httpServer.Shutdown(ctx)
}