-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
kind/bugSomething isn't workingSomething isn't working
Description
Preflight Checklist
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
- I am not looking for support or already pursued the available support channels without success.
- I have checked the troubleshooting guide for my problem, without success.
Viper Version
1.21.0
Go Version
1.24
Config Source
Remove K/V stores
Format
YAML
Repl.it link
No response
Code reproducing the issue
Lines 1250 to 1266 in e66ee1a
| // Config file next | |
| val = v.searchIndexableWithPathPrefixes(v.config, path) | |
| if val != nil { | |
| return val | |
| } | |
| if nested && v.isPathShadowedInDeepMap(path, v.config) != "" { | |
| return nil | |
| } | |
| // K/V store next | |
| val = v.searchMap(v.kvstore, path) | |
| if val != nil { | |
| return val | |
| } | |
| if nested && v.isPathShadowedInDeepMap(path, v.kvstore) != "" { | |
| return nil | |
| } |
Expected Behavior
The same unmarshal key behaviour between local and remote config.
Actual Behavior
unmarshal from remote config (kvstore) using searchMap which can't get value from slice index key path.
Steps To Reproduce
array:
- a
- bviper.Get("array.0") // local config get value 'a'
viper.Get("array.0") // remote config get value nilAdditional Information
No response
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working