mirror of
https://github.com/go-kratos/kratos.git
synced 2025-02-13 13:48:51 +02:00
remove streaming method (#416)
This commit is contained in:
parent
72b47187d9
commit
b867d682d9
@ -293,9 +293,16 @@ func (t *Base) GoTypeName(protoName string) string {
|
||||
return prefix + name
|
||||
}
|
||||
|
||||
func streamingMethod(method *descriptor.MethodDescriptorProto) bool {
|
||||
return (method.ServerStreaming != nil && *method.ServerStreaming) || (method.ClientStreaming != nil && *method.ClientStreaming)
|
||||
}
|
||||
|
||||
func (t *Base) ShouldGenForMethod(file *descriptor.FileDescriptorProto,
|
||||
service *descriptor.ServiceDescriptorProto,
|
||||
method *descriptor.MethodDescriptorProto) bool {
|
||||
if streamingMethod(method) {
|
||||
return false
|
||||
}
|
||||
if !t.Params.ExplicitHTTP {
|
||||
return true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user