(mux *mux.Router, address, cert, key string)
| 28 | } |
| 29 | |
| 30 | func startServer(mux *mux.Router, address, cert, key string) (*http.Server, chan error) { |
| 31 | srv := &http.Server{ |
| 32 | Addr: address, |
| 33 | Handler: mux, |
| 34 | } |
| 35 | |
| 36 | shutdown := make(chan error) |
| 37 | go func() { |
| 38 | err := listenAndServe(srv, address, cert, key) |
| 39 | shutdown <- err |
| 40 | }() |
| 41 | return srv, shutdown |
| 42 | } |
| 43 | |
| 44 | func listenAndServe(srv *http.Server, address, cert, key string) error { |
| 45 | var err error |
no test coverage detected