fix
This commit is contained in:
@@ -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
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user