func AsArray(ctx context.Context, s interface{}, v interface{}) error
func Walk(ctx context.Context, s Source, v Visitor) error
Walk walks through each element in the array
Iterator iterates through keys and values of a array
type Iterator interface { Next(context.Context) bool Pair() *Pair }
func Iterate(ctx context.Context, a interface{}) (Iterator, error)
func New(ch chan *Pair) Iterator
Pair represents a single pair of key and value from a array
type Pair struct { Index int Value interface{} }
Source represents a array that knows how to create an iterator
type Source interface { Iterate(context.Context) Iterator }
Visitor represents an object that handles each pair in a array
type Visitor interface { Visit(int, interface{}) error }
VisitorFunc is a type of Visitor based on a function
type VisitorFunc func(int, interface{}) error
func (fn VisitorFunc) Visit(s int, v interface{}) error