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

Function hasHTTP

codegen/example/example_client.go:118–125  ·  view source on GitHub ↗

hasHTTP returns true if the server expression has an HTTP server.

(root *expr.RootExpr, svr *expr.ServerExpr)

Source from the content-addressed store, hash-verified

116
117// hasHTTP returns true if the server expression has an HTTP server.
118func hasHTTP(root *expr.RootExpr, svr *expr.ServerExpr) bool {
119 for _, s := range svr.Services {
120 if root.API.HTTP.Service(s) != nil {
121 return true
122 }
123 }
124 return false
125}

Callers 1

exampleCLIMainFunction · 0.85

Calls 1

ServiceMethod · 0.65

Tested by

no test coverage detected