From 9773d81ec1129bf870c476a2d20df0cd1cbd66d0 Mon Sep 17 00:00:00 2001 From: "abulo.hoo" Date: Tue, 5 Apr 2022 10:56:31 +0800 Subject: [PATCH] add util func --- util/util.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/util/util.go b/util/util.go index 9d56057..3500848 100644 --- a/util/util.go +++ b/util/util.go @@ -4038,6 +4038,24 @@ func AryInterfaceToArgString(d []interface{}) []string { return data } +func InterfaceToAryMapStringInterface(in interface{}) []map[string]interface{} { + data := make([]map[string]interface{}, 0) + newData := in.([]interface{}) + for _, v := range newData { + data = append(data, ToStringMap(v)) + } + return data +} + +func InterfaceToAryMapStringString(in interface{}) []map[string]string { + data := make([]map[string]string, 0) + newData := in.([]interface{}) + for _, v := range newData { + data = append(data, ToStringMapString(v)) + } + return data +} + //查询是否被整除 func Divide(m, n interface{}) bool { r := math.Mod(ToFloat64(m), ToFloat64(n))