Documentation ¶
Overview ¶
package orderedmap implements tell maps interface for ian coleman's ordered map implementation https://github.com/iancoleman/orderedmap
The MIT License (MIT)
Copyright (c) 2017 Ian Coleman ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, Subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or Substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- func Make(reserve bool) collect.MapWriter
- type ByPair
- type OrderedMap
- func (o *OrderedMap) Delete(key string)
- func (o *OrderedMap) Get(key string) (interface{}, bool)
- func (o *OrderedMap) Keys() []string
- func (o OrderedMap) MarshalJSON() ([]byte, error)
- func (o *OrderedMap) Set(key string, value interface{})
- func (o *OrderedMap) SetEscapeHTML(on bool)
- func (o *OrderedMap) Sort(lessFunc func(a *Pair, b *Pair) bool)
- func (o *OrderedMap) SortKeys(sortFunc func(keys []string))
- func (o OrderedMap) TellMapping() encode.Iterator
- func (o *OrderedMap) UnmarshalJSON(b []byte) error
- func (o *OrderedMap) Values() map[string]interface{}
- type Pair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OrderedMap ¶
type OrderedMap struct {
// contains filtered or unexported fields
}
func New ¶
func New() *OrderedMap
func (*OrderedMap) Delete ¶
func (o *OrderedMap) Delete(key string)
func (*OrderedMap) Get ¶
func (o *OrderedMap) Get(key string) (interface{}, bool)
func (*OrderedMap) Keys ¶
func (o *OrderedMap) Keys() []string
func (OrderedMap) MarshalJSON ¶
func (o OrderedMap) MarshalJSON() ([]byte, error)
func (*OrderedMap) Set ¶
func (o *OrderedMap) Set(key string, value interface{})
func (*OrderedMap) SetEscapeHTML ¶
func (o *OrderedMap) SetEscapeHTML(on bool)
func (*OrderedMap) Sort ¶
func (o *OrderedMap) Sort(lessFunc func(a *Pair, b *Pair) bool)
Sort Sort the map using your sort func
func (*OrderedMap) SortKeys ¶
func (o *OrderedMap) SortKeys(sortFunc func(keys []string))
SortKeys Sort the map keys using your sort func
func (OrderedMap) TellMapping ¶
func (o OrderedMap) TellMapping() encode.Iterator
implements the encoder mapping modification of the map during iteration may yield surprising results.
func (*OrderedMap) UnmarshalJSON ¶
func (o *OrderedMap) UnmarshalJSON(b []byte) error
func (*OrderedMap) Values ¶
func (o *OrderedMap) Values() map[string]interface{}