9 releases (3 stable)
new 1.1.1 | Dec 15, 2024 |
---|---|
1.1.0 | Dec 14, 2024 |
0.1.2 | May 3, 2020 |
0.1.1 | Mar 22, 2020 |
#175 in Configuration
416 downloads per month
Used in chewdata
20KB
79 lines
env_applier
Apply environment variables on a string.
Getting Started
Quick Start
extern crate env_applier;
use env_applier::*;
fn main() -> () {
let config = r#"{"test":"{{ HOME }}"}"#.to_string().apply();
println!("My new config : {:?}", config);
}
or with prefix
extern crate env_applier;
use env_applier::*;
fn main() -> () {
let config = r#"{"test":"{{ HOME }}"}"#.to_string().apply_with_prefix("MY_PREFIX");
println!("My new config : {:?}", config);
}
Useful link
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.