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

Function hasJSONRPC

codegen/example/example_client.go:108–115  ·  view source on GitHub ↗

hasJSONRPC returns true if the server expression has a JSON-RPC server.

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

Source from the content-addressed store, hash-verified

106
107// hasJSONRPC returns true if the server expression has a JSON-RPC server.
108func hasJSONRPC(root *expr.RootExpr, svr *expr.ServerExpr) bool {
109 for _, s := range svr.Services {
110 if root.API.JSONRPC.Service(s) != nil {
111 return true
112 }
113 }
114 return false
115}
116
117// hasHTTP returns true if the server expression has an HTTP server.
118func hasHTTP(root *expr.RootExpr, svr *expr.ServerExpr) bool {

Callers 1

exampleCLIMainFunction · 0.85

Calls 1

ServiceMethod · 0.65

Tested by

no test coverage detected