From 5fdc8cb50e61d29bcdd139c1f2cc51471f830ef8 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Sat, 26 Aug 2023 23:47:23 -0400 Subject: [PATCH] Write code to get auth key --- cli/src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index e7a11a9..1aa7aa1 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -1,3 +1,9 @@ -fn main() { - println!("Hello, world!"); +use std::env; + +fn get_auth_key() -> Option { + env::var("AUTH_KEY").ok() +} + +fn main() { + let _auth_key = get_auth_key().expect("Could not find authorization key"); }