|
@@ -24,14 +24,6 @@ func Atof(x string) float64 {
|
|
return ret
|
|
return ret
|
|
}
|
|
}
|
|
|
|
|
|
-func StartsWith(s string, pref string) bool {
|
|
|
|
- return strings.HasPrefix(s, pref)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-func EndsWith(s string, suff string) bool {
|
|
|
|
- return strings.HasSuffix(s, suff)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
func Upper(s string) string {
|
|
func Upper(s string) string {
|
|
return strings.ToUpper(s)
|
|
return strings.ToUpper(s)
|
|
}
|
|
}
|
|
@@ -39,8 +31,6 @@ func Upper(s string) string {
|
|
func GetExprEnv(ctx map[string]interface{}) map[string]interface{} {
|
|
func GetExprEnv(ctx map[string]interface{}) map[string]interface{} {
|
|
var ExprLib = map[string]interface{}{
|
|
var ExprLib = map[string]interface{}{
|
|
"Atof": Atof,
|
|
"Atof": Atof,
|
|
- "StartsWith": StartsWith,
|
|
|
|
- "EndsWith": EndsWith,
|
|
|
|
"JsonExtract": JsonExtract,
|
|
"JsonExtract": JsonExtract,
|
|
"JsonExtractLib": JsonExtractLib,
|
|
"JsonExtractLib": JsonExtractLib,
|
|
"File": File,
|
|
"File": File,
|