vss/internal/template/template.v

13 lines
267 B
Coq
Raw Normal View History

2022-07-27 14:54:44 +09:00
module template
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
2022-07-30 02:24:29 +09:00
}