Apply fixes suggested by staticcheck
This commit is contained in:
parent
82c22e3969
commit
3d7a09347d
19 changed files with 26 additions and 315 deletions
|
|
@ -45,12 +45,7 @@ func (sr1 *SourceRange) Equal(sr2 *SourceRange) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
match := sets.StringElementsMatch(sr1.CIDR, sr2.CIDR)
|
||||
if !match {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
return sets.StringElementsMatch(sr1.CIDR, sr2.CIDR)
|
||||
}
|
||||
|
||||
type ipwhitelist struct {
|
||||
|
|
|
|||
|
|
@ -95,12 +95,7 @@ func (rt1 *Config) Equal(rt2 *Config) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
match := sets.StringElementsMatch(rt1.Whitelist, rt2.Whitelist)
|
||||
if !match {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
return sets.StringElementsMatch(rt1.Whitelist, rt2.Whitelist)
|
||||
}
|
||||
|
||||
// Zone returns information about the NGINX rate limit (limit_req_zone)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue