MCPcopy Create free account
hub / github.com/catboost/catboost / DoRun

Method DoRun

library/cpp/getopt/last_getopt_demo/demo.cpp:206–235  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204 }
205
206 int DoRun(NLastGetopt::TOptsParseResult&& parsedOptions) override {
207 using namespace NColorizer;
208
209 TString method = ExplicitMethod_ ? ExplicitMethod_ : ImplicitMethod_;
210
211 Cerr << ST_LIGHT << "Settings:" << RESET << Endl;
212 Cerr << GREEN << " Background: " << RESET << Background_ << Endl;
213 Cerr << GREEN << " Timeout: " << RESET << Timeout_ << Endl;
214 Cerr << GREEN << " Method: " << RESET << method.Quote() << Endl;
215 Cerr << GREEN << " UserAgent: " << RESET << UserAgent_.Quote() << Endl;
216 Cerr << GREEN << " PostData: " << RESET << (PostData_ ? PostData_->Quote() : "Nothing") << Endl;
217 Cerr << GREEN << " PostFile: " << RESET << (PostFile_ ? PostFile_->Quote() : "Nothing") << Endl;
218
219 Cerr << ST_LIGHT << "Headers:" << RESET << Endl;
220 for (auto& header : Headers_) {
221 Cerr << " " << header.Quote() << Endl;
222 }
223 if (!Headers_) {
224 Cerr << GREEN << " no headers" << RESET << Endl;
225 }
226
227 Cerr << ST_LIGHT << "Will download the following URLs:" << RESET << Endl;
228 for (auto& arg : parsedOptions.GetFreeArgs()) {
229 Cerr << " " << arg.Quote() << Endl;
230 }
231 if (!parsedOptions.GetFreeArgs()) {
232 Cerr << " no urls" << Endl;
233 }
234 return 0;
235 }
236};
237
238int main(int argc, const char** argv) {

Callers

nothing calls this directly

Calls 1

GetFreeArgsMethod · 0.45

Tested by

no test coverage detected