test
This commit is contained in:
14
src/main.cpp
Normal file
14
src/main.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <string>
|
||||
#include <toml++/toml.h>
|
||||
|
||||
int main (int argc, char *argv[]) {
|
||||
auto config = toml::parse_file("config.toml");
|
||||
bool ingest_all_logs = config["all"].value_or(false);
|
||||
std::string log_path = config["minecraft"]["logs_path"].value_or("");
|
||||
if(log_path.empty()) throw std::runtime_error("your dumbass can't put in a path");
|
||||
std::string clickhouse_username = config["clickhouse"]["username"].value_or("");
|
||||
std::string clickouse_password = config["clickhouse"]["password"].value_or("");
|
||||
if(clickhouse_username.empty() || clickouse_password.empty()) throw std::runtime_error("put the creds in the right place idiot");
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user