Add environment catcher
This commit is contained in:
parent
58ae565fd4
commit
639d02ea4a
|
@ -4,7 +4,7 @@ use log::error;
|
||||||
use std::env;
|
use std::env;
|
||||||
|
|
||||||
/// Get the environment variiable var_name or panic
|
/// Get the environment variiable var_name or panic
|
||||||
pub fn get_env_variable(var_name: &String) -> String {
|
pub fn get_env_variable(var_name: &str) -> String {
|
||||||
match env::var(var_name) {
|
match env::var(var_name) {
|
||||||
Ok(v) => v,
|
Ok(v) => v,
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
|
|
Loading…
Reference in a new issue