aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt/small/modchooser.cpp
diff options
context:
space:
mode:
authormvel <mvel@yandex-team.ru>2022-02-10 16:45:41 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:41 +0300
commit43f5a35593ebc9f6bcea619bb170394ea7ae468e (patch)
treee98df59de24d2ef7c77baed9f41e4875a2fef972 /library/cpp/getopt/small/modchooser.cpp
parentbd30392c4cc92487950adc375c07adf52da1d592 (diff)
downloadydb-43f5a35593ebc9f6bcea619bb170394ea7ae468e.tar.gz
Restoring authorship annotation for <mvel@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/getopt/small/modchooser.cpp')
-rw-r--r--library/cpp/getopt/small/modchooser.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/getopt/small/modchooser.cpp b/library/cpp/getopt/small/modchooser.cpp
index 6d11600a46..2fa5cfd070 100644
--- a/library/cpp/getopt/small/modchooser.cpp
+++ b/library/cpp/getopt/small/modchooser.cpp
@@ -7,9 +7,9 @@
#include <library/cpp/colorizer/colors.h>
#include <util/stream/output.h>
-#include <util/stream/format.h>
+#include <util/stream/format.h>
#include <util/generic/yexception.h>
-#include <util/generic/ptr.h>
+#include <util/generic/ptr.h>
#include <util/string/builder.h>
#include <util/string/join.h>
@@ -99,7 +99,7 @@ void TModChooser::AddMode(const TString& mode, const TMainFunctionPtrV func, con
}
void TModChooser::AddMode(const TString& mode, TMainClass* func, const TString& description, bool hidden, bool noCompletion) {
- if (Modes.FindPtr(mode)) {
+ if (Modes.FindPtr(mode)) {
ythrow yexception() << "TMode '" << mode << "' already exists in TModChooser.";
}
@@ -184,7 +184,7 @@ int TModChooser::Run(const int argc, const char** argv) const {
PrintHelp(argv[0]);
return 0;
}
- if (VersionHandler && (modeName == "-v" || modeName == "--version")) {
+ if (VersionHandler && (modeName == "-v" || modeName == "--version")) {
VersionHandler();
return 0;
}
@@ -199,7 +199,7 @@ int TModChooser::Run(const int argc, const char** argv) const {
}
if (modeIter == Modes.end()) {
- Cerr << "Unknown mode " << modeName.Quote() << "." << Endl;
+ Cerr << "Unknown mode " << modeName.Quote() << "." << Endl;
PrintHelp(argv[0]);
return 1;
}
@@ -280,9 +280,9 @@ TString TModChooser::TMode::FormatFullName(size_t pad) const {
void TModChooser::PrintHelp(const TString& progName) const {
Cerr << Description << Endl << Endl;
Cerr << NColorizer::StdErr().BoldColor() << "Usage" << NColorizer::StdErr().OldColor() << ": " << progName << " MODE [MODE_OPTIONS]" << Endl;
- Cerr << Endl;
+ Cerr << Endl;
Cerr << NColorizer::StdErr().BoldColor() << "Modes" << NColorizer::StdErr().OldColor() << ":" << Endl;
- size_t maxModeLen = 0;
+ size_t maxModeLen = 0;
for (const auto& [name, mode] : Modes) {
if (name != mode->Name)
continue; // this is an alias
@@ -309,11 +309,11 @@ void TModChooser::PrintHelp(const TString& progName) const {
}
}
}
-
- Cerr << Endl;
- Cerr << "To get help for specific mode type '" << progName << " MODE " << ModesHelpOption << "'" << Endl;
- if (VersionHandler)
- Cerr << "To print program version type '" << progName << " --version'" << Endl;
+
+ Cerr << Endl;
+ Cerr << "To get help for specific mode type '" << progName << " MODE " << ModesHelpOption << "'" << Endl;
+ if (VersionHandler)
+ Cerr << "To print program version type '" << progName << " --version'" << Endl;
if (!SvnRevisionOptionDisabled) {
Cerr << "To print svn revision type --svnrevision" << Endl;
}