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

Method Finalize

expr/grpc_error.go:47–59  ·  view source on GitHub ↗

Finalize looks up the corresponding method error expression.

(a *GRPCEndpointExpr)

Source from the content-addressed store, hash-verified

45
46// Finalize looks up the corresponding method error expression.
47func (e *GRPCErrorExpr) Finalize(a *GRPCEndpointExpr) {
48 var ee *ErrorExpr
49 switch p := e.Response.Parent.(type) {
50 case *GRPCEndpointExpr:
51 ee = p.MethodExpr.Error(e.Name)
52 case *GRPCServiceExpr:
53 ee = p.Error(e.Name)
54 case *GRPCExpr:
55 ee = Root.Error(e.Name)
56 }
57 e.ErrorExpr = ee
58 e.Response.Finalize(a, e.AttributeExpr)
59}
60
61// Dup creates a copy of the error expression.
62func (e *GRPCErrorExpr) Dup() *GRPCErrorExpr {

Callers

nothing calls this directly

Calls 2

FinalizeMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected