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
For example, I have a YAML configuration file like this:
Server:
Host: "localhost:8080"
If I read this setting with this:
host:=viper.GetString("Server.Host")
host contains the intended value, but if I read it with this code:
host:=viper.Sub("Server").GetString("Host")
host is empty.
Further debugging reveals that with Sub(), viper seems to store the configuration with exact case ("Host"), but on GetString(), the query key is lowercased and the comparison "Host" == "host" fails.
According to the doc, I thought viper was case-insensitive, so maybe this is a bug?
The text was updated successfully, but these errors were encountered:
For example, I have a YAML configuration file like this:
If I read this setting with this:
host
contains the intended value, but if I read it with this code:host
is empty.Further debugging reveals that with
Sub()
, viper seems to store the configuration with exact case ("Host"
), but onGetString()
, the query key is lowercased and the comparison"Host" == "host"
fails.According to the doc, I thought viper was case-insensitive, so maybe this is a bug?
The text was updated successfully, but these errors were encountered: