add go lang add/minus functions and give better example

This commit is contained in:
Maidul Islam
2024-04-18 15:45:20 -04:00
parent 2aea73861b
commit 581ffc613c
3 changed files with 22 additions and 12 deletions

View File

@@ -381,6 +381,12 @@ func ProcessTemplate(templateId int, templatePath string, data interface{}, acce
funcs := template.FuncMap{
"secret": secretFunction,
"dynamic_secret": dynamicSecretFunction,
"minus": func(a, b int) int {
return a - b
},
"add": func(a, b int) int {
return a + b
},
}
templateName := path.Base(templatePath)