MCPcopy Create free account
hub / github.com/goadesign/goa / ExampleCLIFiles

Function ExampleCLIFiles

jsonrpc/codegen/example_cli.go:12–20  ·  view source on GitHub ↗

ExampleCLIFiles returns example JSON-RPC client CLI implementation.

(genpkg string, data *httpcodegen.ServicesData)

Source from the content-addressed store, hash-verified

10
11// ExampleCLIFiles returns example JSON-RPC client CLI implementation.
12func ExampleCLIFiles(genpkg string, data *httpcodegen.ServicesData) []*codegen.File {
13 var fw []*codegen.File
14 for _, svr := range data.Root.API.Servers {
15 if m := exampleCLI(genpkg, data, svr); m != nil {
16 fw = append(fw, m)
17 }
18 }
19 return fw
20}
21
22func exampleCLI(genpkg string, data *httpcodegen.ServicesData, svr *expr.ServerExpr) *codegen.File {
23 f := httpcodegen.ExampleCLI(genpkg, svr, data)

Callers

nothing calls this directly

Calls 1

exampleCLIFunction · 0.70

Tested by

no test coverage detected