Skip to content

Commit

Permalink
remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Banning committed Oct 18, 2017
1 parent 1cda74d commit 55d3a56
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions keyvalues.go
Expand Up @@ -58,9 +58,6 @@ func (mv Map) ValuesForKey(key string, subkeys ...string) ([]interface{}, error)
var cnt int
hasKey(m, key, &ret, &cnt, subKeyMap)
return ret[:cnt], nil
// ret := make([]interface{}, 0)
// hasKey(m, key, &ret, subKeyMap)
// return ret, nil
}

// hasKey - if the map 'key' exists append it to array
Expand Down Expand Up @@ -121,12 +118,10 @@ func hasKey(iv interface{}, key string, ret *[]interface{}, cnt *int, subkeys ma
// scan the rest
for _, v := range vv {
hasKey(v, key, ret, cnt, subkeys)
// hasKey(v, key, ret, subkeys)
}
case []interface{}:
for _, v := range iv.([]interface{}) {
hasKey(v, key, ret, cnt, subkeys)
// hasKey(v, key, ret, subkeys)
}
}
}
Expand Down Expand Up @@ -331,9 +326,6 @@ func (mv Map) oldValuesForPath(path string, subkeys ...string) ([]interface{}, e
if keys[len(keys)-1] == "" {
keys = keys[:len(keys)-1]
}
// ivals := make([]interface{}, 0)
// valuesForKeyPath(&ivals, m, keys, subKeyMap)
// return ivals, nil
ivals := make([]interface{}, 0, defaultArraySize)
var cnt int
valuesForKeyPath(&ivals, &cnt, m, keys, subKeyMap)
Expand Down

0 comments on commit 55d3a56

Please sign in to comment.