go-x-pkg / servers

Exported function returning value of unexported type RVV-B0011
Anti-pattern
Major
a year ago3 years old
exported method IntoIter returns unexported type servers.iterator, which can be annoying to use
156
157type Servers []*ServerWrapped
158
159func (ss Servers) IntoIter() iterator { return ss.ForEach }160
161func (ss Servers) ForEach(cb iterCb) bool {
162	for _, s := range ss {