@@ -224,14 +224,12 @@ func ArrayReduce(data interface{}, cb func(float64, interface{}) float64, start
224
224
return start
225
225
}
226
226
227
- type ArrayKeyByS map [interface {}][]interface {}
228
-
229
- func ArrayKeyBy (data interface {}, key string ) ArrayKeyByS {
227
+ func ArrayKeyBy (data interface {}, key string ) map [interface {}][]interface {} {
230
228
v := TryInterfacePtr (data )
231
229
AssetsSlice (v .Kind (), "数组转换接口错误, 非数组接口" )
232
230
233
231
vl := v .Len ()
234
- dst := make (ArrayKeyByS , vl )
232
+ dst := make (map [ interface {}][] interface {} , vl )
235
233
for i := 0 ; i < vl ; i ++ {
236
234
tmp := v .Index (i ).Interface ()
237
235
// 相信宝贝你不会存在不存在的情况 - -
@@ -241,12 +239,12 @@ func ArrayKeyBy(data interface{}, key string) ArrayKeyByS {
241
239
return dst
242
240
}
243
241
244
- func ArrayKeyFuncBy (data interface {}, key string , cb func (interface {}) interface {}) ArrayKeyByS {
242
+ func ArrayKeyFuncBy (data interface {}, key string , cb func (interface {}) interface {}) map [ interface {}][] interface {} {
245
243
v := TryInterfacePtr (data )
246
244
AssetsSlice (v .Kind (), "数组转换接口错误, 非数组接口" )
247
245
248
246
vl := v .Len ()
249
- dst := make (ArrayKeyByS , vl )
247
+ dst := make (map [ interface {}][] interface {} , vl )
250
248
for i := 0 ; i < vl ; i ++ {
251
249
tmp := v .Index (i ).Interface ()
252
250
// 相信宝贝你不会存在不存在的情况 - -
0 commit comments