MCPcopy Create free account
hub / github.com/apache/kvrocks / ParseCommandLineOptions

Function ParseCommandLineOptions

utils/kvrocks2redis/main.cc:67–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67static Options ParseCommandLineOptions(int argc, char **argv) {
68 int ch = 0;
69 Options opts;
70 while ((ch = ::getopt(argc, argv, "c:hv")) != -1) {
71 switch (ch) {
72 case 'c': {
73 opts.conf_file = optarg;
74 break;
75 }
76 case 'v':
77 std::cout << "kvrocks2redis " << PrintVersion() << std::endl;
78 exit(0);
79 case 'h':
80 default:
81 Usage(argv[0]);
82 }
83 }
84 return opts;
85}
86
87static void InitSpdlog(const kvrocks2redis::Config &config) {
88 std::vector<spdlog::sink_ptr> sinks = {

Callers 1

mainFunction · 0.70

Calls 2

PrintVersionFunction · 0.85
UsageFunction · 0.85

Tested by

no test coverage detected