ExampleServerFiles returns example JSON-RPC server implementation.
(genpkg string, data *httpcodegen.ServicesData, files []*codegen.File)
| 13 | |
| 14 | // ExampleServerFiles returns example JSON-RPC server implementation. |
| 15 | func ExampleServerFiles(genpkg string, data *httpcodegen.ServicesData, files []*codegen.File) []*codegen.File { |
| 16 | var fw []*codegen.File |
| 17 | for _, svr := range data.Root.API.Servers { |
| 18 | if m := exampleServer(genpkg, data, svr, files); m != nil { |
| 19 | fw = append(fw, m) |
| 20 | } |
| 21 | } |
| 22 | return fw |
| 23 | } |
| 24 | |
| 25 | func exampleServer(genpkg string, data *httpcodegen.ServicesData, svr *expr.ServerExpr, files []*codegen.File) *codegen.File { |
| 26 | svrdata := example.Servers.Get(svr, data.Root) |
nothing calls this directly
no test coverage detected