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
hello, i'm using viper to get config from a .yaml file, i have following yaml:
Bloomfilter:
Name: example
N: 1000000
P: 0.001
and the struct:
type bloomfilter struct {
Name string `yaml:"Name"`
N uint64 `yaml:"Y"`
P float64 `yaml:"P"`
}
after unmarshal, i can get all the correct values except N (N is always 0), it looks that would be convert to bool when the key is 'n' or 'y', then bloomfilter.N = 0 as zerovalue?
i am not sure this is a bug or ... feature? so i can not use ‘n’ or 'y' as the key?
The text was updated successfully, but these errors were encountered:
hello, i'm using viper to get config from a .yaml file, i have following yaml:
and the struct:
after unmarshal, i can get all the correct values except N (N is always 0), it looks that would be convert to bool when the key is 'n' or 'y', then bloomfilter.N = 0 as zerovalue?
i am not sure this is a bug or ... feature? so i can not use ‘n’ or 'y' as the key?
The text was updated successfully, but these errors were encountered: