This commit is contained in:
eson
2023-11-15 12:30:39 +08:00
parent 00be6206a9
commit 4018826abe
2 changed files with 4 additions and 24 deletions

View File

@@ -1,20 +0,0 @@
package format
import (
"encoding/json"
"text/template"
)
var TemplateFuncMap = template.FuncMap{
"add": func(a, b int) int {
return a + b
},
"json_decode": func(o interface{}) interface{} {
var r []map[string]interface{}
err := json.Unmarshal([]byte(o.(string)), &r)
if err != nil {
panic(err)
}
return r
},
}