Documentation
¶
Index ¶
- func CompareIntSlices(s1 []int, s2 []int) bool
- func CompareSets(s1 map[string]struct{}, s2 map[string]struct{}) bool
- func CompareSlices(s1 []interface{}, s2 []interface{}) bool
- func CompareSlices2D(s1 [][]interface{}, s2 [][]interface{}) bool
- func CompareStringSlices(s1 []string, s2 []string) bool
- func CompareStringSlices2D(s1 [][]string, s2 [][]string) bool
- func MakeComparableMap(m *map[string]bool)
- func MakeComparableMap2(m *map[string]map[bool]struct{})
- func MakeComparableMapStr(m *map[string]string)
- func YMDHMS(in ...int) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareIntSlices ¶
CompareIntSlices - compares two int slices
func CompareSets ¶
CompareSets - comparses two string sets
func CompareSlices ¶
func CompareSlices(s1 []interface{}, s2 []interface{}) bool
CompareSlices - compares two any type slices
func CompareSlices2D ¶
func CompareSlices2D(s1 [][]interface{}, s2 [][]interface{}) bool
CompareSlices2D - compares two slices of any type slices
func CompareStringSlices ¶
CompareStringSlices - compares two string slices
func CompareStringSlices2D ¶
CompareStringSlices2D - compares two slices of string slices
func MakeComparableMap ¶
MakeComparableMap - transforms input map { k1: v1, k2: v2, ..., kn: vn } into map with single key being its string representation, works on map[string]bool type Example: { "b": true, "a": false, "c": true } --> { "a:false,b:true,c:true,": true } We cannot compare such maps directly because order of keys is not guaranteed
func MakeComparableMap2 ¶
MakeComparableMap2 - transforms input map { k1: { true: struct{}{}, false: struct{}{}, ...}, k2: { ... } ... } into map with single key being its string representation, works on map[string]map[bool]struct{} type Example: { "w": { true: struct{}{}, false: struct{}{}}, "y10": { false: struct{}{}} } --> { "w:t,w:f,y10:f,": { false: struct{}{} } } We cannot compare such maps directly because order of keys is not guaranteed
func MakeComparableMapStr ¶
MakeComparableMapStr - transforms input map { k1: v1, k2: v2, ..., kn: vn } into map with single key being its string representation, works on map[string]string type Example: { "b": "x", "a": "y", "c": "z" } --> { "a:y,b:x,c:z,": true } We cannot compare such maps directly because order of keys is not guaranteed
Types ¶
This section is empty.