You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A maintainer will take a look at your issue shortly. 👀
In the meantime: We are working on Viper v2 and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues.
📣 If you've already given us your feedback, you can still help by spreading the news,
either by sharing the above link or telling people about this on Twitter:
Preflight Checklist
Problem Description
viper always assumes a lower-cased key given.
acutally
users need upper-cased or more complex format of key to store/load
Proposed Solution
type Viper struct {
keyGenerator KeyGenerator
}
type KeyGenerator interface{
GetKey(key string) string
}
func (v *Viper) CustomKeyGenerator(kg KeyGenerator) {
v.keyGenerator = kg
}
func (v *Viper) GetKey(key string) {
if v.keyGenerator != nil {
return v.keyGenerator.GetKey(key)
}
return strings.ToLower(key)
}
Alternatives Considered
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: