()
| 9 | ) |
| 10 | |
| 11 | func main() { |
| 12 | // create a type that satisfies the `api.ServerInterface`, which contains an implementation of every operation from the generated code |
| 13 | server := api.NewServer() |
| 14 | |
| 15 | r := mux.NewRouter() |
| 16 | |
| 17 | // get an `http.Handler` that we can use |
| 18 | h := api.HandlerFromMux(server, r) |
| 19 | |
| 20 | s := &http.Server{ |
| 21 | Handler: h, |
| 22 | Addr: "0.0.0.0:8080", |
| 23 | } |
| 24 | |
| 25 | // And we serve HTTP until the world ends. |
| 26 | log.Fatal(s.ListenAndServe()) |
| 27 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…