vss/internal/template/template.v
zztkm 3be9a7ed53 merged vss.v into main.v
the impact of this.
- change factory func to public
2023-08-07 08:03:23 +09:00

13 lines
297 B
V

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
}