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

Method ServiceFor

expr/http.go:65–75  ·  view source on GitHub ↗

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

(s *ServiceExpr, root *HTTPExpr)

Source from the content-addressed store, hash-verified

63// ServiceFor creates a new or returns the existing service definition for the
64// given service.
65func (h *HTTPExpr) ServiceFor(s *ServiceExpr, root *HTTPExpr) *HTTPServiceExpr {
66 if res := h.Service(s.Name); res != nil {
67 return res
68 }
69 res := &HTTPServiceExpr{
70 ServiceExpr: s,
71 Root: root,
72 }
73 h.Services = append(h.Services, res)
74 return res
75}
76
77// EvalName returns the name printed in case of evaluation error.
78func (*HTTPExpr) EvalName() string {

Callers

nothing calls this directly

Calls 1

ServiceMethod · 0.95

Tested by

no test coverage detected