feat: data-driven.

This commit is contained in:
徐聪
2021-12-28 18:16:02 +08:00
parent 111736553c
commit 71af36ff6f
11 changed files with 268 additions and 90 deletions

View File

@@ -14,6 +14,7 @@ var Functions = map[string]interface{}{
"gen_random_string": genRandomString, // call with one argument
"max": math.Max, // call with two arguments
"md5": MD5,
"getAppVersion": getAppVersion, // test
}
func init() {
@@ -44,3 +45,7 @@ func MD5(str string) string {
hasher.Write([]byte(str))
return hex.EncodeToString(hasher.Sum(nil))
}
func getAppVersion() []float64 {
return []float64{3.1, 3.3}
}