aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/grpc/test/core/util/cmdline.cc
diff options
context:
space:
mode:
authorheretic <heretic@yandex-team.ru>2022-02-10 16:45:43 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:43 +0300
commit397cbe258b9e064f49c4ca575279f02f39fef76e (patch)
treea0b0eb3cca6a14e4e8ea715393637672fa651284 /contrib/libs/grpc/test/core/util/cmdline.cc
parent43f5a35593ebc9f6bcea619bb170394ea7ae468e (diff)
downloadydb-397cbe258b9e064f49c4ca575279f02f39fef76e.tar.gz
Restoring authorship annotation for <heretic@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/grpc/test/core/util/cmdline.cc')
-rw-r--r--contrib/libs/grpc/test/core/util/cmdline.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/contrib/libs/grpc/test/core/util/cmdline.cc b/contrib/libs/grpc/test/core/util/cmdline.cc
index 62b47f927a..0fd090e8e4 100644
--- a/contrib/libs/grpc/test/core/util/cmdline.cc
+++ b/contrib/libs/grpc/test/core/util/cmdline.cc
@@ -22,12 +22,12 @@
#include <stdio.h>
#include <string.h>
-#include <vector>
-
-#include "y_absl/strings/str_cat.h"
-#include "y_absl/strings/str_format.h"
-#include "y_absl/strings/str_join.h"
-
+#include <vector>
+
+#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/str_format.h"
+#include "y_absl/strings/str_join.h"
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
@@ -130,42 +130,42 @@ void gpr_cmdline_on_extra_arg(
/* recursively descend argument list, adding the last element
to s first - so that arguments are added in the order they were
added to the list by api calls */
-static void add_args_to_usage(arg* a, std::vector<TString>* s) {
- if (a == nullptr) return;
- add_args_to_usage(a->next, s);
+static void add_args_to_usage(arg* a, std::vector<TString>* s) {
+ if (a == nullptr) return;
+ add_args_to_usage(a->next, s);
switch (a->type) {
case ARGTYPE_BOOL:
- s->push_back(y_absl::StrFormat(" [--%s|--no-%s]", a->name, a->name));
+ s->push_back(y_absl::StrFormat(" [--%s|--no-%s]", a->name, a->name));
break;
case ARGTYPE_STRING:
- s->push_back(y_absl::StrFormat(" [--%s=string]", a->name));
+ s->push_back(y_absl::StrFormat(" [--%s=string]", a->name));
break;
case ARGTYPE_INT:
- s->push_back(y_absl::StrFormat(" [--%s=int]", a->name));
+ s->push_back(y_absl::StrFormat(" [--%s=int]", a->name));
break;
}
}
-TString gpr_cmdline_usage_string(gpr_cmdline* cl, const char* argv0) {
+TString gpr_cmdline_usage_string(gpr_cmdline* cl, const char* argv0) {
const char* name = strrchr(argv0, '/');
- if (name != nullptr) {
+ if (name != nullptr) {
name++;
} else {
name = argv0;
}
- std::vector<TString> s;
- s.push_back(y_absl::StrCat("Usage: ", name));
- add_args_to_usage(cl->args, &s);
+ std::vector<TString> s;
+ s.push_back(y_absl::StrCat("Usage: ", name));
+ add_args_to_usage(cl->args, &s);
if (cl->extra_arg) {
- s.push_back(y_absl::StrFormat(" [%s...]", cl->extra_arg_name));
+ s.push_back(y_absl::StrFormat(" [%s...]", cl->extra_arg_name));
}
- s.push_back("\n");
- return y_absl::StrJoin(s, "");
+ s.push_back("\n");
+ return y_absl::StrJoin(s, "");
}
static int print_usage_and_die(gpr_cmdline* cl) {
- fprintf(stderr, "%s", gpr_cmdline_usage_string(cl, cl->argv0).c_str());
+ fprintf(stderr, "%s", gpr_cmdline_usage_string(cl, cl->argv0).c_str());
if (!cl->survive_failure) {
exit(1);
}