first commit
This commit is contained in:
24
main.cpp
Normal file
24
main.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include <expected>
|
||||
#include <string>
|
||||
#include <print>
|
||||
|
||||
#include "env.hpp"
|
||||
|
||||
using std::unexpected;
|
||||
using std::expected;
|
||||
using std::println;
|
||||
using std::string;
|
||||
|
||||
int main() {
|
||||
Env env;
|
||||
env.loadEnv("");
|
||||
expected<string, string> result = env.get("FIRST");
|
||||
if (!result.has_value()) {
|
||||
println("{}", result.error());
|
||||
return 1;
|
||||
}
|
||||
|
||||
println("{}", result.value());
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user