feat(core/main): adding debug mode to see the args
This commit is contained in:
parent
d747ae8535
commit
bb90951c85
1 changed files with 6 additions and 3 deletions
9
main.cpp
9
main.cpp
|
|
@ -1,11 +1,14 @@
|
|||
#include <iostream>
|
||||
#include "core.hpp"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc != 3) {
|
||||
std::cerr << "Usage: " << argv[0] << " <port> <password>" << std::endl;
|
||||
std::cerr << CLR_RED << "Usage: " << argv[0] << " <port> <password>" << CLR_RESET << std::endl;
|
||||
return 1;
|
||||
}
|
||||
std::cout << "Port:" << argv[1] << std::endl;
|
||||
std::cout << "Password:" << argv[2] << std::endl;
|
||||
if (DEBUG) {
|
||||
std::cout << CLR_GREY << "Port:\t\t" << CLR_GREEN << argv[1] << CLR_RESET << std::endl;
|
||||
std::cout << CLR_GREY << "Password:\t" << CLR_GREEN << argv[2] << CLR_RESET << std::endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue