iterator

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackIterator

type CallbackIterator struct {
	// contains filtered or unexported fields
}

func NewCallbackIterator

func NewCallbackIterator(next func() bool, value func() (string, error), close func() error) *CallbackIterator

NewCallbackIterator provides an iterator interface based on closure callbacks

func (*CallbackIterator) Close

func (i *CallbackIterator) Close() error

Close performs any cleanups. It may be used to return the last error

func (*CallbackIterator) Next

func (i *CallbackIterator) Next() bool

Next returns true if we have more iterations pending

func (*CallbackIterator) Value

func (i *CallbackIterator) Value() (string, error)

Value returns the current value, and/or an error

Jump to

Keyboard shortcuts

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