remove streaming method (#416)

pull/418/head v0.3.1
Sam 5 years ago committed by Tony
parent 72b47187d9
commit b867d682d9
  1. 7
      tool/protobuf/pkg/generator/generator.go

@ -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…
Cancel
Save