env_applier 1.1.0

Apply environment variables on an object
Documentation

env_applier

Actions Status semantic-release crates.io

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.

License

Apache MIT