mirror of
https://github.com/spf13/viper
synced 2025-05-11 06:37:27 +00:00
Removed whitespace to satify coding standards
This commit is contained in:
parent
c5f88b31d3
commit
6a8ee097ff
1 changed files with 0 additions and 2 deletions
2
viper.go
2
viper.go
|
@ -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]
|
||||
|
|
Loading…
Add table
Reference in a new issue