Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzack9999 committed Jul 24, 2023
1 parent 1040830 commit 12ec7fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ratelimit_var.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,15 @@ func (rateLimitMap *RateLimitMap) Set(value string) error {
}

for _, rateLimit := range rateLimits {

var k, v string
if idxSep := strings.Index(rateLimit, kvSep); idxSep > 0 {
k = rateLimit[:idxSep]
v = rateLimit[idxSep+1:]
}

// note:
// - inserting multiple times the same key will override the previous v
// - empty string is legitimate rateLimit

if k != "" {
rateLimit, err := parseRateLimit(v)
if err != nil {
Expand Down

0 comments on commit 12ec7fb

Please sign in to comment.