Endpoint returns the endpoint data for the endpoint with the given name, nil if there isn't one.
(name string)
| 437 | // Endpoint returns the endpoint data for the endpoint with the given name, nil |
| 438 | // if there isn't one. |
| 439 | func (sd *ServiceData) Endpoint(name string) *EndpointData { |
| 440 | for _, ed := range sd.Endpoints { |
| 441 | if ed.Method.Name == name { |
| 442 | return ed |
| 443 | } |
| 444 | } |
| 445 | return nil |
| 446 | } |
| 447 | |
| 448 | // HasUnaryEndpoint returns true if the service has at least one unary endpoint. |
| 449 | func (sd *ServiceData) HasUnaryEndpoint() bool { |
no outgoing calls
no test coverage detected