Added tests for MissingMapFields and IfaceAsSliceString

This commit is contained in:
Trial97
2019-12-04 14:36:37 +02:00
parent 2a356792fb
commit 4780f3bbef
4 changed files with 155 additions and 22 deletions

View File

@@ -192,24 +192,6 @@ func (sm StringMap) GetSlice() (result []string) {
return
}
/*
func NoDots(m map[string]struct{}) map[string]struct{} {
return MapKeysReplace(m, ".", "")
}
func YesDots(m map[string]struct{}) map[string]struct{} {
return MapKeysReplace(m, "", ".")
}
func MapKeysReplace(m map[string]struct{}, old, new string) map[string]struct{} {
for key, val := range m {
delete(m, key)
key = strings.Replace(key, old, new, -1)
m[key] = val
}
return m
}
*/
// Used to merge multiple maps (eg: output of struct having ExtraFields)
func MergeMapsStringIface(mps ...map[string]interface{}) (outMp map[string]interface{}) {
outMp = make(map[string]interface{})