iterator

package
v1.6.112 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2023 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Len

func Len(iter Iterator) int

Len consumes the iterator and returns the number of elements found.

IMPORTANT: this method consumes the iterator, so it should not be used after Len() returns.

Types

type Iterator

type Iterator interface {
	// Next returns the next element or nil if there are none left.
	Next() any
}

Iterator represents an object that can iterate over a set of values one at a time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL