package arrayiter
import "github.com/lestrrat-go/iter/arrayiter"
Index ¶
- func AsArray(ctx context.Context, s interface{}, v interface{}) error
- func Walk(ctx context.Context, s Source, v Visitor) error
- type Iterator
- type Pair
- type Source
- type Visitor
- type VisitorFunc
Functions ¶
func AsArray ¶
func Walk ¶
Walk walks through each element in the array
Types ¶
type Iterator ¶
Iterator iterates through keys and values of a array
func Iterate ¶
func New ¶
type Pair ¶
type Pair struct { Index int Value interface{} }
Pair represents a single pair of key and value from a array
type Source ¶
Source represents a array that knows how to create an iterator
type Visitor ¶
Visitor represents an object that handles each pair in a array
type VisitorFunc ¶
VisitorFunc is a type of Visitor based on a function
func (VisitorFunc) Visit ¶
func (fn VisitorFunc) Visit(s int, v interface{}) error
Source Files ¶
- Version
- v1.0.2 (latest)
- Published
- Mar 29, 2022
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 3 weeks ago –
Tools for package owners.