(genpkg string, data *httpcodegen.ServicesData, svr *expr.ServerExpr)
| 20 | } |
| 21 | |
| 22 | func exampleCLI(genpkg string, data *httpcodegen.ServicesData, svr *expr.ServerExpr) *codegen.File { |
| 23 | f := httpcodegen.ExampleCLI(genpkg, svr, data) |
| 24 | if f == nil { |
| 25 | return nil |
| 26 | } |
| 27 | f.Path = strings.Replace(f.Path, "http.go", "jsonrpc.go", 1) |
| 28 | updateHeader(f) |
| 29 | for _, s := range f.SectionTemplates { |
| 30 | s.Source = strings.ReplaceAll(s.Source, "doHTTP", "doJSONRPC") |
| 31 | s.Source = strings.ReplaceAll(s.Source, "httpUsage", "jsonrpcUsage") |
| 32 | } |
| 33 | |
| 34 | return f |
| 35 | } |
no test coverage detected