Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
Signed-off-by: Rolf Ahrenberg <[email protected]>
  • Loading branch information
rofafor committed Nov 28, 2024
1 parent 4e82e6f commit b3fecd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config/config_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ func (this *rateLimitDescriptor) loadDescriptors(config RateLimitConfigToLoad, p
panic(newRateLimitConfigError(config.Name, "descriptor has empty key"))
}

// Value is optional, so the final key for the map is either the key only or key_value.
// Value is optional, so the final key for the map is either the key only or key_value if value differs from key.
finalKey := descriptorConfig.Key
if descriptorConfig.Value != "" && descriptorConfig.Value != finalKey {
if descriptorConfig.Value != "" && descriptorConfig.Value != descriptorConfig.Key {
finalKey += "_" + descriptorConfig.Value
}

Expand Down

0 comments on commit b3fecd4

Please sign in to comment.