Documentation
¶
Overview ¶
Package orderedmap provides a Map that preserves the order of key value pairs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { Value interface{} // contains filtered or unexported fields }
Entry represents a map value entry.
func (*Entry) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Entry) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type Map ¶
type Map struct { // Data holds the map entries in unsorted order. Data map[string]Entry // Keys contains the map keys in sorted order. Keys []string }
Map implements a map that keeps the item order.
func (*Map) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Map) Range ¶
Range calls f sequentially for each key and value present in the map. If f returns false, range stops the iteration.
func (*Map) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.