Documentation
¶
Overview ¶
Copyright 2017 Moritz Fain Moritz Fain <moritz@mertinkat.net>
Index ¶
- type KV
- type KeyType
- type OrderedMap
- func (om *OrderedMap) Append(newOm *OrderedMap, overwrite bool) *OrderedMap
- func (obj *OrderedMap) Delete(key KeyType)
- func (om *OrderedMap) Exists(key KeyType) (ok bool)
- func (om *OrderedMap) Get(key KeyType) ValueType
- func (om *OrderedMap) GetKeys() (keys []KeyType)
- func (om *OrderedMap) GetList() (kvList []KV)
- func (om *OrderedMap) Len() int
- func (om *OrderedMap) MarshalJSON() ([]byte, error)
- func (om *OrderedMap) MarshalYAML() ([]byte, error)
- func (om *OrderedMap) Set(key KeyType, value ValueType) *OrderedMap
- func (om *OrderedMap) String() string
- type ValueType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KV ¶
func (KV) MarshalJSON ¶
Marshal JSON for single KV item (convenience only)
func (KV) MarshalYAML ¶
MarshalYAML Marshals the ordered map to yaml
type OrderedMap ¶
type OrderedMap struct {
// contains filtered or unexported fields
}
func (*OrderedMap) Append ¶
func (om *OrderedMap) Append(newOm *OrderedMap, overwrite bool) *OrderedMap
Appends the given ordered map to the current one
func (*OrderedMap) Delete ¶
func (obj *OrderedMap) Delete(key KeyType)
func (*OrderedMap) Exists ¶
func (om *OrderedMap) Exists(key KeyType) (ok bool)
Checks for existence of a given key
func (*OrderedMap) Get ¶
func (om *OrderedMap) Get(key KeyType) ValueType
Returns the given key's value or <nil> if key does not exist
func (*OrderedMap) GetKeys ¶
func (om *OrderedMap) GetKeys() (keys []KeyType)
Returns ordered list of keys
func (*OrderedMap) GetList ¶
func (om *OrderedMap) GetList() (kvList []KV)
Returns ordered list of key-value pairs
func (*OrderedMap) MarshalJSON ¶
func (om *OrderedMap) MarshalJSON() ([]byte, error)
Marshal JSON for ordered map
func (*OrderedMap) MarshalYAML ¶
func (om *OrderedMap) MarshalYAML() ([]byte, error)
MarshalYAML Marshalls the ordered map to yaml
func (*OrderedMap) Set ¶
func (om *OrderedMap) Set(key KeyType, value ValueType) *OrderedMap
Sets value for given key
func (*OrderedMap) String ¶
func (om *OrderedMap) String() string
Returns JSON serialized string representation
Click to show internal directories.
Click to hide internal directories.