From a94817b94b5d36946072a0d8eca4d936bb694f81 Mon Sep 17 00:00:00 2001 From: Shubhendu Ram Tripathi Date: Wed, 13 Dec 2023 16:25:50 +0530 Subject: [PATCH] lint fixes Signed-off-by: Shubhendu Ram Tripathi --- quota-commands.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/quota-commands.go b/quota-commands.go index 42d479b..73d5d6a 100644 --- a/quota-commands.go +++ b/quota-commands.go @@ -57,7 +57,7 @@ func (o *SetBucketQuotaOptions) getURLValues() url.Values { // BucketThrottleRule holds a bucket throttle rule type BucketThrottleRule struct { - ID string `json:id` // indicates unique id of rule + ID string `json:"id"` // indicates unique id of rule ConcurrentRequestsCount uint64 `json:"concurrentRequestsCount"` // indicates no of concurrent requests APIs []string `json:"apis"` // indicates list of APIs } @@ -103,9 +103,8 @@ func (q BucketQuota) HasDuplicateThrottleRules() (bool, string, string) { for _, api := range rule.APIs { if eRule, ok := rulesMap[strings.ToLower(api)]; ok { return true, api, eRule.ID - } else { - rulesMap[strings.ToLower(api)] = rule } + rulesMap[strings.ToLower(api)] = rule } } return false, "", ""