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 {
An exported function or method returning a value of an unexported type may be frustrating to use.
In Go, if the function or method starts with a lowercase letter, it is not exported outside the package.
type unexportedType string
func ExportedFunc() *unexportedType {
return &unexportedType("some string")
}
type ExportedType string
func ExportedFunc() *ExportedType {
return &ExportedType("some string")
}