feat: add elasticsearch tracing subscriber
create lib/pk_core
This commit is contained in:
7
lib/pk_core/src/util.rs
Normal file
7
lib/pk_core/src/util.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
/// get_env gets an env variable as Option<String instead of Result<String>.
|
||||
pub fn get_env(key: &str) -> Option<String> {
|
||||
match std::env::var(key) {
|
||||
Ok(val) => { Some(val) }
|
||||
Err(_) => None
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user