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

Function hasJSONRPCEndpoints

codegen/example/example_server.go:172–179  ·  view source on GitHub ↗

hasJSONRPCEndpoints returns true if the service has JSON-RPC endpoints.

(root *expr.RootExpr, data *service.Data)

Source from the content-addressed store, hash-verified

170
171// hasJSONRPCEndpoints returns true if the service has JSON-RPC endpoints.
172func hasJSONRPCEndpoints(root *expr.RootExpr, data *service.Data) bool {
173 for _, svc := range root.API.JSONRPC.Services {
174 if svc.Name() == data.Name {
175 return true
176 }
177 }
178 return false
179}

Callers 1

exampleSvrMainFunction · 0.85

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected