func AsMap(ctx context.Context, s interface{}, v interface{}) error
AsMap returns the values obtained from the source as a map
func Walk(ctx context.Context, s Source, v Visitor) error
Walk walks through each element in the map
Iterator iterates through keys and values of a map
type Iterator interface { Next(context.Context) bool Pair() *Pair }
func Iterate(ctx context.Context, m interface{}) (Iterator, error)
Iterate creates an iterator from arbitrary map types. This is not the most efficient tool, but it's the quickest way to create an iterator for maps. Also, note that you cannot make any assumptions on the order of pairs being returned.
func New(ch chan *Pair) Iterator
Pair represents a single pair of key and value from a map
type Pair struct { Key interface{} Value interface{} }
Source represents a map that knows how to create an iterator
type Source interface { Iterate(context.Context) Iterator }
Visitor represents an object that handles each pair in a map
type Visitor interface { Visit(interface{}, interface{}) error }
VisitorFunc is a type of Visitor based on a function
type VisitorFunc func(interface{}, interface{}) error
func (fn VisitorFunc) Visit(s interface{}, v interface{}) error