Skip to content

Commit

Permalink
add util func
Browse files Browse the repository at this point in the history
  • Loading branch information
abulo committed Apr 5, 2022
1 parent 9b7d9da commit 9773d81
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 9773d81

Please sign in to comment.