fix: linting issues

This commit is contained in:
Henrique Dias 2025-06-25 17:34:00 +02:00
parent 221451a517
commit e74c958862
No known key found for this signature in database

View File

@ -269,15 +269,15 @@ func getRunParams(flags *pflag.FlagSet, st *storage.Storage) *settings.Server {
return server return server
} }
// getStringParamB returns a parameter as a string and a boolean to tell if it is different from the default // getBoolParamB returns a parameter as a string and a boolean to tell if it is different from the default
// //
// NOTE: we could simply bind the flags to viper and use IsSet. // NOTE: we could simply bind the flags to viper and use IsSet.
// Although there is a bug on Viper that always returns true on IsSet // Although there is a bug on Viper that always returns true on IsSet
// if a flag is binded. Our alternative way is to manually check // if a flag is binded. Our alternative way is to manually check
// the flag and then the value from env/config/gotten by viper. // the flag and then the value from env/config/gotten by viper.
// https://github.com/spf13/viper/pull/331 // https://github.com/spf13/viper/pull/331
func getBoolParamB(flags *pflag.FlagSet, key string) (bool, bool) { func getBoolParamB(flags *pflag.FlagSet, key string) (value bool, ok bool) {
value, _ := flags.GetBool(key) value, _ = flags.GetBool(key)
// If set on Flags, use it. // If set on Flags, use it.
if flags.Changed(key) { if flags.Changed(key) {