Documentation ¶
Index ¶
- func JSONBytesEqual(a, b []byte) (bool, error)
- func ListCompare(subsetSlice interface{}, supersetSlice interface{}, match MatchComparator) interface{}
- func ListToMap(slice interface{}, key string) map[string]interface{}
- func SliceInterfaceToSlice(slice interface{}) []interface{}
- func ToJSONString(e error) string
- type ErrorString
- type MatchComparator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONBytesEqual ¶
JSONBytesEqual compares the JSON in two byte slices.
func ListCompare ¶
func ListCompare(subsetSlice interface{}, supersetSlice interface{}, match MatchComparator) interface{}
ListCompare compare two lists and returns the first non matching item of the subset first list argument or nil if All subset elements were matched In case the superset and subset have same length this corresponds to the equality condition (based on the match comparator)
func SliceInterfaceToSlice ¶
func SliceInterfaceToSlice(slice interface{}) []interface{}
SliceInterfaceToSlice Convert a Slice interface to an actual explicit slide
func ToJSONString ¶
ToJSONString converts error string to json string
Types ¶
type ErrorString ¶
type ErrorString struct {
S string
}
ErrorString is an error string
func (*ErrorString) Error ¶
func (e *ErrorString) Error() string
Error returns the string of the error (wow!)
type MatchComparator ¶
type MatchComparator func(l interface{}, r interface{}) bool
MatchComparator takes a left and right element and compare them. In case of matching true is returned, false otherwise
Click to show internal directories.
Click to hide internal directories.