trello-to-deck/src/template.rs
Paul Campbell c8ff4b2694
Some checks failed
Test / build (map[name:stable]) (push) Successful in 2m4s
Test / build (map[name:nightly]) (push) Successful in 2m23s
Release Please / Release-plz (push) Failing after 20s
feat: command to write initial config file
move tests to a tests/mod
????
2024-12-12 17:31:31 +00:00

10 lines
271 B
Rust

//
use std::collections::HashMap;
pub(crate) fn expand(template: &str, params: HashMap<&str, &str>) -> String {
let mut result = template.to_string();
for (key, value) in params {
result = result.replace(&format!("{{{key}}}"), value);
}
result
}