You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
297 B
V

2 years ago
module template
// parse template with target
pub fn parse(template string, target map[string]string) string {
mut content := template
for key in target.keys() {
at_key := '@' + key
value := target[key]
// assign to content
content = content.replace(at_key, value)
}
return content
2 years ago
}