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

Function CLIFiles

codegen/example/example_client.go:14–22  ·  view source on GitHub ↗

CLIFiles returns example client tool main implementation for each server expression in the design.

(genpkg string, root *expr.RootExpr)

Source from the content-addressed store, hash-verified

12// CLIFiles returns example client tool main implementation for each server
13// expression in the design.
14func CLIFiles(genpkg string, root *expr.RootExpr) []*codegen.File {
15 var fw []*codegen.File
16 for _, svr := range root.API.Servers {
17 if m := exampleCLIMain(genpkg, root, svr); m != nil {
18 fw = append(fw, m)
19 }
20 }
21 return fw
22}
23
24// exampleCLIMain returns an example client tool main implementation for the
25// given server expression.

Callers 2

ExampleFunction · 0.92
TestExampleCLIFilesFunction · 0.85

Calls 1

exampleCLIMainFunction · 0.85

Tested by 1

TestExampleCLIFilesFunction · 0.68