diff options
author | heretic <heretic@yandex-team.ru> | 2022-02-10 16:45:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:46 +0300 |
commit | 81eddc8c0b55990194e112b02d127b87d54164a9 (patch) | |
tree | 9142afc54d335ea52910662635b898e79e192e49 /contrib/libs/grpc/test/cpp/util/service_describer.cc | |
parent | 397cbe258b9e064f49c4ca575279f02f39fef76e (diff) | |
download | ydb-81eddc8c0b55990194e112b02d127b87d54164a9.tar.gz |
Restoring authorship annotation for <heretic@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/grpc/test/cpp/util/service_describer.cc')
-rw-r--r-- | contrib/libs/grpc/test/cpp/util/service_describer.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/libs/grpc/test/cpp/util/service_describer.cc b/contrib/libs/grpc/test/cpp/util/service_describer.cc index 399784751c..2af1104b97 100644 --- a/contrib/libs/grpc/test/cpp/util/service_describer.cc +++ b/contrib/libs/grpc/test/cpp/util/service_describer.cc @@ -20,14 +20,14 @@ #include <iostream> #include <sstream> -#include <util/generic/string.h> +#include <util/generic/string.h> #include <vector> namespace grpc { namespace testing { -TString DescribeServiceList(std::vector<TString> service_list, - grpc::protobuf::DescriptorPool& desc_pool) { +TString DescribeServiceList(std::vector<TString> service_list, + grpc::protobuf::DescriptorPool& desc_pool) { std::stringstream result; for (auto it = service_list.begin(); it != service_list.end(); it++) { auto const& service = *it; @@ -40,16 +40,16 @@ TString DescribeServiceList(std::vector<TString> service_list, return result.str(); } -TString DescribeService(const grpc::protobuf::ServiceDescriptor* service) { - TString result; +TString DescribeService(const grpc::protobuf::ServiceDescriptor* service) { + TString result; if (service->options().deprecated()) { result.append("DEPRECATED\n"); } result.append("filename: " + service->file()->name() + "\n"); - TString package = service->full_name(); + TString package = service->full_name(); size_t pos = package.rfind("." + service->name()); - if (pos != TString::npos) { + if (pos != TString::npos) { package.erase(pos); result.append("package: " + package + ";\n"); } @@ -61,7 +61,7 @@ TString DescribeService(const grpc::protobuf::ServiceDescriptor* service) { return result; } -TString DescribeMethod(const grpc::protobuf::MethodDescriptor* method) { +TString DescribeMethod(const grpc::protobuf::MethodDescriptor* method) { std::stringstream result; result << " rpc " << method->name() << (method->client_streaming() ? "(stream " : "(") @@ -74,16 +74,16 @@ TString DescribeMethod(const grpc::protobuf::MethodDescriptor* method) { return result.str(); } -TString SummarizeService(const grpc::protobuf::ServiceDescriptor* service) { - TString result; +TString SummarizeService(const grpc::protobuf::ServiceDescriptor* service) { + TString result; for (int i = 0; i < service->method_count(); ++i) { result.append(SummarizeMethod(service->method(i))); } return result; } -TString SummarizeMethod(const grpc::protobuf::MethodDescriptor* method) { - TString result = method->name(); +TString SummarizeMethod(const grpc::protobuf::MethodDescriptor* method) { + TString result = method->name(); result.append("\n"); return result; } |