Don't set stream unless its true
This commit is contained in:
parent
5cc92860a6
commit
f867969aa3
13
extractor.go
13
extractor.go
@ -90,14 +90,19 @@ func extractEndpoint(method reflect.Method) *registry.Endpoint {
|
||||
request := extractValue(reqType, 0)
|
||||
response := extractValue(rspType, 0)
|
||||
|
||||
return ®istry.Endpoint{
|
||||
ep := ®istry.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 {
|
||||
|
Loading…
Reference in New Issue
Block a user