Removed whitespace to satify coding standards

This commit is contained in:
Dylan Reimerink 2020-03-05 21:12:02 +01:00
parent c5f88b31d3
commit 6a8ee097ff

View file

@ -602,9 +602,7 @@ func (v *Viper) searchMapWithPathPrefixes(source interface{}, path []string) int
// search for path prefixes, starting from the longest one
for i := len(path); i > 0; i-- {
prefixKey := strings.ToLower(strings.Join(path[0:i], v.keyDelim))
if sourceSlice, ok := source.([]interface{}); ok {
//if the prefixKey is a number which is not out of bounds of the slice
if index, err := strconv.Atoi(prefixKey); err == nil && len(sourceSlice) > index {
next := sourceSlice[index]