I’m just reading hugo code and can’t understand, why hugo sets keys to viper in upper case, when viper.Get and Set methods are case insensitive. It really confuses
For example, in file commands/hugo.go
:
...
if flagChanged(cmdV.PersistentFlags(), "verbose") {
viper.Set("Verbose", verbose)
}
if flagChanged(cmdV.PersistentFlags(), "logFile") {
viper.Set("LogFile", logFile)
}
if flagChanged(cmdV.Flags(), "cleanDestinationDir") {
viper.Set("cleanDestinationDir", cleanDestination)
}
if flagChanged(cmdV.Flags(), "buildDrafts") {
viper.Set("BuildDrafts", draft)
}
if flagChanged(cmdV.Flags(), "buildFuture") {
viper.Set("BuildFuture", future)
}
if flagChanged(cmdV.Flags(), "buildExpired") {
viper.Set("BuildExpired", expired)
}
...
Why all keys are in uppercase except cleanDestinationDIr?
Maybe it will be better to use all keys in lowercase to make no confusions?