Finalize finalizes the server expressions.
()
| 326 | |
| 327 | // Finalize finalizes the server expressions. |
| 328 | func (r *RootExpr) Finalize() { |
| 329 | if r.API == nil { |
| 330 | r.API = &APIExpr{} |
| 331 | } |
| 332 | if len(r.API.Servers) == 0 { |
| 333 | r.API.Servers = []*ServerExpr{r.API.DefaultServer()} |
| 334 | } |
| 335 | for _, e := range r.Errors { |
| 336 | e.Finalize() |
| 337 | } |
| 338 | for _, s := range r.API.Servers { |
| 339 | s.Finalize() |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | // walkHTTPServices walks the HTTP services and endpoints. |
| 344 | func (r *RootExpr) walkHTTPServices(svcs []*HTTPServiceExpr, walk eval.SetWalker) { |
nothing calls this directly
no test coverage detected