常用类型及数据操作方法
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

24 lines
500 B

package helper
import (
"testing"
)
func Test_HttpBuildQuery(t *testing.T) {
a := map[string]interface{}{"id": "1", "name": "8","price":"2.3"}
b := map[string]interface{}{"id": "2", "name": "7","price":"2.8"}
c := map[string]interface{}{"id": "3", "name": "9","price":"2.1"}
list := []map[string]interface{}{}
list = append(list, a)
list = append(list, b)
list = append(list, c)
//ret := HttpBuildQuery(list)
ret, err := MapSort("asc", "name", list)
if err != nil {
}
t.Log(ret)
}