对 对象切片 进行排序
根据对象其中的一个参数,进行排序
sort.Slice(XX, func(i, j int) bool {
s, t := XX[i].Sort, XX[j].Sort
return s < t
})
对 对象切片 进行排序
根据对象其中的一个参数,进行排序
sort.Slice(XX, func(i, j int) bool {
s, t := XX[i].Sort, XX[j].Sort
return s < t
})