Добавлены недостающие файлы
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user