(port string)
| 16 | } |
| 17 | |
| 18 | func NewServer(port string) *Server { |
| 19 | s := &Server{} |
| 20 | strictHandler := NewStrictHandler(s, nil) |
| 21 | handler := Handler(strictHandler) |
| 22 | s.httpServer = &http.Server{ |
| 23 | Handler: handler, |
| 24 | Addr: ":" + port, |
| 25 | } |
| 26 | return s |
| 27 | } |
| 28 | func (s Server) Run(ctx context.Context) error { |
| 29 | go func() { |
| 30 | <-ctx.Done() |
no test coverage detected