25 lines
410 B
C++
25 lines
410 B
C++
#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;
|
|
}
|