Don't set stream unless its true

This commit is contained in:
Asim Aslam 2019-11-09 10:32:52 +00:00 committed by Vasiliy Tolstov
parent 5cc92860a6
commit f867969aa3

View File

@ -90,14 +90,19 @@ func extractEndpoint(method reflect.Method) *registry.Endpoint {
request := extractValue(reqType, 0)
response := extractValue(rspType, 0)
return &registry.Endpoint{
ep := &registry.Endpoint{
Name: method.Name,
Request: request,
Response: response,
Metadata: map[string]string{
"stream": fmt.Sprintf("%v", stream),
},
}
if stream {
ep.Metadata = map[string]string{
"stream": fmt.Sprintf("%v", stream),
}
}
return ep
}
func extractSubValue(typ reflect.Type) *registry.Value {