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

Method EvalName

expr/method.go:82–93  ·  view source on GitHub ↗

EvalName returns the generic expression name used in error messages.

()

Source from the content-addressed store, hash-verified

80
81// EvalName returns the generic expression name used in error messages.
82func (m *MethodExpr) EvalName() string {
83 var prefix, suffix string
84 if m.Name != "" {
85 suffix = fmt.Sprintf("method %#v", m.Name)
86 } else {
87 suffix = "unnamed method"
88 }
89 if m.Service != nil {
90 prefix = m.Service.EvalName() + " "
91 }
92 return prefix + suffix
93}
94
95// Prepare makes sure the payload and result types are initialized (to the Empty
96// type if nil) and merges the method interceptors with the API and service level

Callers 1

TestMethodExprEvalNameFunction · 0.95

Calls 1

EvalNameMethod · 0.65

Tested by 1

TestMethodExprEvalNameFunction · 0.76