parameter 'reloading' seems to be unused, consider removing or renaming it as _
181}
182
183// Adjust is used to adjust the TSO configurations.
184func (c *Config) Adjust(meta *toml.MetaData, reloading bool) error {185 configMetaData := configutil.NewConfigMetadata(meta)
186 if err := configMetaData.CheckUndecoded(); err != nil {
187 c.WarningMsgs = append(c.WarningMsgs, err.Error())
parameter 'reloading' seems to be unused, consider removing or renaming it as _
186}
187
188// Adjust is used to adjust the resource manager configurations.
189func (c *Config) Adjust(meta *toml.MetaData, reloading bool) error {190 configMetaData := configutil.NewConfigMetadata(meta)
191 warningMsgs := make([]string, 0)
192 if err := configMetaData.CheckUndecoded(); err != nil {
parameter 'meta' seems to be unused, consider removing or renaming it as _
99}
100
101// Adjust adjusts the configuration and initializes it with the default value if necessary.
102func (rmc *ControllerConfig) Adjust(meta *configutil.ConfigMetaData) {103 if rmc == nil {
104 return
105 }
Description
Unused parameters in functions or methods should be replaced with _
(underscore) or removed.
Functions or methods with unused parameters can be a symptom of unfinished
refactoring or a bug. If an unused parameter is present, it should be named _
(underscore) to avoid raising this issue and better readability.
Bad practice
func abc(unused string) {
fmt.Println("Not using any passed params.")
}
Recommended
func abc(_ string) {
fmt.Println("Not using any passed params.")
}
func abc() {
fmt.Println("Not using any passed params.")
}