created env module
This commit is contained in:
parent
92d0010186
commit
c8800a7f53
1 changed files with 10 additions and 0 deletions
10
src/env.rs
Normal file
10
src/env.rs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
use std::env::{ set_var, var };
|
||||||
|
|
||||||
|
pub type ENV_VAR = (&'static str, &'static str);
|
||||||
|
|
||||||
|
pub static ATTACH_SYMBOL: ENV_VAR = ("ATTACH_SYMBOL", "*");
|
||||||
|
|
||||||
|
pub fn env_var(var: ENV_VAR) -> String {
|
||||||
|
var(var.0).unwrap_or(var.1.to_string())
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue