Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KVs ¶
type KVs interface { GetValueOr(key interface{}, defValue interface{}) interface{} Contains(key interface{}) bool IfContains(key interface{}, action func(value interface{})) KVs }
KVs interface
type SimpleKV ¶
type SimpleKV struct { Key interface{} Value interface{} }
SimpleKV is common structure to store key-value pairs. When you need something like Pair, you can use this
type SimpleKVs ¶
type SimpleKVs struct {
// contains filtered or unexported fields
}
SimpleKVs will store SimpleKV collection as map
func (*SimpleKVs) GetValueOr ¶
func (kvs *SimpleKVs) GetValueOr(key interface{}, defValue interface{}) interface{}
GetValueOr returns the value for a given key, if non-existent it returns defValue
func (*SimpleKVs) IfContains ¶
IfContains invokes the action on a key if it exists
Click to show internal directories.
Click to hide internal directories.