Function
parseTemplate
(content string, tmpMap map[string]interface{})
Source from the content-addressed store, hash-verified
| 401 | } |
| 402 | |
| 403 | func parseTemplate(content string, tmpMap map[string]interface{}) (result string) { |
| 404 | |
| 405 | t := template.Must(template.New("template").Parse(content)) |
| 406 | |
| 407 | var tpl bytes.Buffer |
| 408 | |
| 409 | if err := t.Execute(&tpl, tmpMap); err != nil { |
| 410 | ShowError(err, 0) |
| 411 | } |
| 412 | result = tpl.String() |
| 413 | |
| 414 | return |
| 415 | } |
| 416 | |
| 417 | func indexOfString(element string, data []string) int { |
| 418 | |
Tested by
no test coverage detected