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

Method ServiceFor

expr/grpc.go:25–34  ·  view source on GitHub ↗

ServiceFor creates a new or returns the existing service definition for the given service.

(s *ServiceExpr)

Source from the content-addressed store, hash-verified

23// ServiceFor creates a new or returns the existing service definition for
24// the given service.
25func (g *GRPCExpr) ServiceFor(s *ServiceExpr) *GRPCServiceExpr {
26 if res := g.Service(s.Name); res != nil {
27 return res
28 }
29 res := &GRPCServiceExpr{
30 ServiceExpr: s,
31 }
32 g.Services = append(g.Services, res)
33 return res
34}
35
36// EvalName returns the name printed in case of evaluation error.
37func (*GRPCExpr) EvalName() string {

Callers 4

FilesFunction · 0.45
GRPCFunction · 0.45
HTTPFunction · 0.45
JSONRPCFunction · 0.45

Calls 1

ServiceMethod · 0.95

Tested by

no test coverage detected