germinate 0.2.0

A templating library for injecting variables from multiple external sources
Documentation

Germinate

Crates.io docs.rs

A templating library for injecting variables from multiple external sources

Example

This is a simple example showing how to pull values from the environment

use germinate::Seed;

#[tokio::main]
async fn main() {
    std::env::set_var("NAME", "John Wick");
    let mut seed = Seed::new("Hi %env:NAME%!".into());
    let output = seed.germinate().await.unwrap();

    assert_eq!(String::from("Hi John Wick!"), output);
}

Sources

Currently implemented sources:

Custom sources

For an example of integrating your own value source, checkout the Seed struct in the docs

License

GPL-3.0