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

Function ServerFiles

codegen/example/example_server.go:16–24  ·  view source on GitHub ↗

ServerFiles returns an example server main implementation for every server expression in the service design.

(genpkg string, root *expr.RootExpr, services *service.ServicesData)

Source from the content-addressed store, hash-verified

14// ServerFiles returns an example server main implementation for every server
15// expression in the service design.
16func ServerFiles(genpkg string, root *expr.RootExpr, services *service.ServicesData) []*codegen.File {
17 var fw []*codegen.File
18 for _, svr := range root.API.Servers {
19 if m := exampleSvrMain(genpkg, root, svr, services); m != nil {
20 fw = append(fw, m)
21 }
22 }
23 return fw
24}
25
26// exampleSvrMain returns the default main function for the given server
27// expression.

Callers 2

ExampleFunction · 0.92
TestExampleServerFilesFunction · 0.70

Calls 1

exampleSvrMainFunction · 0.85

Tested by 1

TestExampleServerFilesFunction · 0.56