因为是从Java转过来的,习惯于stream一些集合操作,在goutil中找到了Find,FindOrDefault,TakeWhile等方法
想问一下有没有取对象数组每一个对象的某个字段,然后转成数组的方法?
和java的 list.stream.map(Product::getXXX) 相似
thanks @wenccc !
@kuunnss 已经新增方法:
goutil/arrutil/collection_gte118.go
Lines 5 to 20 in 3f1a328
下个版本发布
Owner Name | gookit |
Repo Name | goutil |
Full Name | gookit/goutil |
Language | Go |
Created Date | 2018-07-03 |
Updated Date | 2023-03-22 |
Star Count | 1263 |
Watcher Count | 29 |
Fork Count | 142 |
Issue Count | 3 |