gostream:关于受Java 8+启发的Go-Stream Collection库

时间:2021-04-17 13:34:42
【文件属性】:
文件名称:gostream:关于受Java 8+启发的Go-Stream Collection库
文件大小:13KB
文件格式:ZIP
更新时间:2021-04-17 13:34:42
Go GoStream gostream 是一个数据流式处理库。它可以声明式地对数据进行转换、过滤、排序、分组、收集,而无需关心操作细节。 Get GoStream go get github.com/a2dict/gostream Example See package main import ( "fmt" "reflect" . "github.com/a2dict/gostream" ) func main() { input := []int{4, 3, 2, 1} want := []int{6, 8} got := From(input).Map(func(it interface{}) interface{} { return 2 * it.(int) }).Filter(func(it interface{}) bool { return it.(int
【文件预览】:
gostream-master
----example()
--------example.go(481B)
--------walkthrough.go(6KB)
----collect_test.go(7KB)
----typ.go(325B)
----partition_test.go(778B)
----collect.go(3KB)
----gopark()
--------partition_test.go(1KB)
--------README.md(46B)
--------partition.go(576B)
----collectv2.go(2KB)
----zip_test.go(1KB)
----zip.go(881B)
----result.go(761B)
----stream.go(1KB)
----result_test.go(258B)
----.gitignore(12B)
----go.sum(175B)
----README.md(2KB)
----partition.go(744B)
----go.mod(87B)
----benchmark_test.go(4KB)

网友评论