Fix lint issues from v1.62.0 upgrade (#20633)

* Fix lint issues from v1.62.0 upgrade

* Fix xlMetaV2TrimData version checks.
This commit is contained in:
Klaus Post
2024-11-11 06:51:43 -08:00
committed by GitHub
parent e6ca6de194
commit 4972735507
17 changed files with 89 additions and 88 deletions

View File

@@ -63,14 +63,14 @@ func (c *OperatorDNS) addAuthHeader(r *http.Request) error {
return nil
}
func (c *OperatorDNS) endpoint(bucket string, delete bool) (string, error) {
func (c *OperatorDNS) endpoint(bucket string, del bool) (string, error) {
u, err := url.Parse(c.Endpoint)
if err != nil {
return "", err
}
q := u.Query()
q.Add("bucket", bucket)
q.Add("delete", strconv.FormatBool(delete))
q.Add("delete", strconv.FormatBool(del))
u.RawQuery = q.Encode()
return u.String(), nil
}

View File

@@ -49,10 +49,10 @@ type Config struct {
}
// Update - updates the config with latest values
func (c *Config) Update(new Config) error {
func (c *Config) Update(updated Config) error {
configLk.Lock()
defer configLk.Unlock()
c.MaxTimeout = getMaxTimeout(new.MaxTimeout)
c.MaxTimeout = getMaxTimeout(updated.MaxTimeout)
return nil
}