Documentation ¶
Index ¶
- Constants
- func MapSSEqual(a, b map[string]string) bool
- func MapSSMerge(first map[string]string, second map[string]string) map[string]string
- func MapSSToKeyValues(kvs map[string]string, sep string) string
- func MapSSValOrEmpty(data map[string]string, key string) string
- func MapSliceIntersectionExists(haystack map[string]int, needles []string) bool
- func MapStringMapStringIntFuncExactMatch(valWant int) func(string, string, int) bool
- func MapStringMapStringIntFuncIncludeAll(str1, str2 string, val int) bool
- func StringKeys(mp interface{}) []string
- func StringKeysSorted(mp interface{}) []string
- func StringKeysToLowerSorted(mp interface{}) []string
- type MapInt64Int64
- type MapStringInt
- func (msi MapStringInt) Add(key string, val int)
- func (msi MapStringInt) Exists(key string) bool
- func (msi MapStringInt) Keys(sortKeys bool) []string
- func (msi MapStringInt) MinMaxValues() (int, int)
- func (msi MapStringInt) MustGet(key string, defaultValue int) int
- func (msi MapStringInt) Set(key string, val int)
- func (msi MapStringInt) Sorted(sortBy string) []Record
- type MapStringMapStringInt
- func (msmsi MapStringMapStringInt) Add(str1, str2 string, val int)
- func (msmsi MapStringMapStringInt) Counts(sep string) (int, int)
- func (msmsi MapStringMapStringInt) CountsWithVal(wantVal int, sep string) (int, int)
- func (msmsi MapStringMapStringInt) Flatten(prefix, sep string, fnInclude func(string, string, int) bool, ...) []string
- func (msmsi MapStringMapStringInt) Set(str1, str2 string, val int)
- type MapStringSlice
- type Record
- type RecordSet
Constants ¶
const ( SortNameAsc = "name asc" SortNameDesc = "name desc" SortValueAsc = "value asc" SortValueDesc = "value desc" )
Variables ¶
This section is empty.
Functions ¶
func MapSSEqual ¶
func MapSSMerge ¶
func MapSliceIntersectionExists ¶
MapSliceIntersectionExists returns true if one or more of the string needles exists as keys in the map.
func MapStringMapStringIntFuncExactMatch ¶
MapStringMapStringIntFuncExactMatch returns a match function that matches an exact vaule.
func MapStringMapStringIntFuncIncludeAll ¶
MapStringMapStringIntFuncIncludeAll returns match function that matches all values.
func StringKeys ¶
func StringKeys(mp interface{}) []string
func StringKeysSorted ¶
func StringKeysSorted(mp interface{}) []string
func StringKeysToLowerSorted ¶
func StringKeysToLowerSorted(mp interface{}) []string
Types ¶
type MapInt64Int64 ¶
func (MapInt64Int64) KeysSorted ¶
func (m MapInt64Int64) KeysSorted() []int64
func (MapInt64Int64) ValuesSortedByKeys ¶
func (m MapInt64Int64) ValuesSortedByKeys() []int64
type MapStringInt ¶
MapStringInt represents a `map[string]int`
func NewMapStringIntSlice ¶
func NewMapStringIntSlice(slice []string) MapStringInt
func (MapStringInt) Add ¶
func (msi MapStringInt) Add(key string, val int)
Add adds the value of `val` to `key`.
func (MapStringInt) Exists ¶
func (msi MapStringInt) Exists(key string) bool
Exists returns a boolean whether a string key exists.
func (MapStringInt) Keys ¶
func (msi MapStringInt) Keys(sortKeys bool) []string
Keys returns a string slice of the map's keys.
func (MapStringInt) MinMaxValues ¶
func (msi MapStringInt) MinMaxValues() (int, int)
MinMaxValues returns the minium and maximum values of the `map[string]int`.
func (MapStringInt) MustGet ¶
func (msi MapStringInt) MustGet(key string, defaultValue int) int
MustGet returns a value or a default.
func (MapStringInt) Set ¶
func (msi MapStringInt) Set(key string, val int)
Set sets the value of `val` to `key`.
func (MapStringInt) Sorted ¶
func (msi MapStringInt) Sorted(sortBy string) []Record
Sorted returns a set of key names and values sorted by the sort type.
type MapStringMapStringInt ¶
MapStringMapStringInt represents a `map[string]map[string]int`
func (MapStringMapStringInt) Add ¶
func (msmsi MapStringMapStringInt) Add(str1, str2 string, val int)
Add supports adding values to `MapStringMapStringInt` easily.
func (MapStringMapStringInt) Counts ¶
func (msmsi MapStringMapStringInt) Counts(sep string) (int, int)
Counts returns key counts regardless of value.
func (MapStringMapStringInt) CountsWithVal ¶
func (msmsi MapStringMapStringInt) CountsWithVal(wantVal int, sep string) (int, int)
CountsWithVal returns key counts with the desired value.
func (MapStringMapStringInt) Flatten ¶
func (msmsi MapStringMapStringInt) Flatten(prefix, sep string, fnInclude func(string, string, int) bool, dedupe, sortResults bool) []string
Flatten returns the values in the `MapStringMapStringInt` in an string slice.
func (MapStringMapStringInt) Set ¶
func (msmsi MapStringMapStringInt) Set(str1, str2 string, val int)
Set supports setting values to `MapStringMapStringInt` easily.
type MapStringSlice ¶
func (MapStringSlice) Add ¶
func (mss MapStringSlice) Add(key, val string)