Popularity
1.6
Declining
Activity
0.0
Stable
16
2
4
Programming language: Go
License: MIT License
Tags:
Data Structures
Latest version: v0.3.0
goterator alternatives and similar packages
Based on the "Data Structures" category.
Alternatively, view goterator alternatives based on common mentions on social networks and blogs.
-
golang-set
A simple, battle-tested and generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp. -
hyperloglog
HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) brought to you by Axiom -
ttlcache
DISCONTINUED. An in-memory cache with item expiration and generics [Moved to: https://github.com/jellydator/ttlcache] -
Bloomfilter
DISCONTINUED. Face-meltingly fast, thread-safe, marshalable, unionable, probability- and optimal-size-calculating Bloom filter in go -
hilbert
DISCONTINUED. Go package for mapping values to and from space-filling curves, such as Hilbert and Peano curves. -
cuckoo-filter
Cuckoo Filter go implement, better than Bloom Filter, configurable and space optimized 布谷鸟过滤器的Go实现,优于布隆过滤器,可以定制化过滤器参数,并进行了空间优化 -
go-rquad
:pushpin: State of the art point location and neighbour finding algorithms for region quadtrees, in Go -
nan
Zero allocation Nullable structures in one library with handy conversion functions, marshallers and unmarshallers -
hide
A Go type to prevent internal numeric IDs from being exposed to clients using HashIDs and JSON.
InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
Promo
influxdata.com

Do you think we are missing an alternative of goterator or a related project?
README
Goterator
Iterator implementation for Golang to provide map and reduce functionalities.
Package
import (
"github.com/yaa110/goterator"
"github.com/yaa110/goterator/generator"
)
Getting Started
- Create a generator from slices
words := []interface{}{"an", "example", "of", "goterator"}
gen := generator.NewSlice(words)
- Create a generator from channels
chn := make(chan interface{}, 4)
chn <- "an"
chn <- "example"
chn <- "of"
chn <- "goterator"
close(chn)
gen := generator.NewChannel(chn)
- Create custom generators
type TestGenerator struct {
words []string
i int
value string
}
func (g *TestGenerator) Next() bool {
if g.i == len(g.words) {
return false
}
g.value = g.words[g.i]
g.i++
return true
}
func (g *TestGenerator) Value() interface{} {
return g.value
}
gen := &TestGenerator{
words: []string{"an", "example", "of", "goterator"},
i: 0,
value: "",
}
- Iterate over generators
lengths := goterator.New(gen).Map(func(word interface{}) interface{} {
return len(word.(string))
}).Collect()
assert.Equal([]interface{}{2, 7, 2, 9}, lengths)
Please for more information about mappers and reducers (consumers) check the documentation.