Skip to content

Commit

Permalink
fix: don't overload function names with vars
Browse files Browse the repository at this point in the history
  • Loading branch information
aauren committed Apr 14, 2021
1 parent 53cfbe3 commit 0faf772
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions pkg/controllers/routing/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ func (nrc *NetworkRoutingController) disableSourceDestinationCheck() {
},
)
if err != nil {
awserr := err.(awserr.Error)
if awserr.Code() == "UnauthorizedOperation" {
awsErr := err.(awserr.Error)
if awsErr.Code() == "UnauthorizedOperation" {
nrc.ec2IamAuthorized = false
klog.Errorf("Node does not have necessary IAM creds to modify instance attribute. So skipping disabling src-dst check.")
return
Expand Down
18 changes: 9 additions & 9 deletions pkg/controllers/routing/bgp_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,13 @@ func (nrc *NetworkRoutingController) addServiceVIPsDefinedSet() error {
}
}
for _, currentPrefix := range currentDefinedSet.Prefixes {
delete := true
shouldDelete := true
for _, prefix := range advIPPrefixList {
if currentPrefix.IpPrefix == prefix.IpPrefix {
delete = false
shouldDelete = false
}
}
if delete {
if shouldDelete {
toDelete = append(toDelete, currentPrefix)
}
}
Expand Down Expand Up @@ -216,13 +216,13 @@ func (nrc *NetworkRoutingController) addiBGPPeersDefinedSet() ([]string, error)
}
}
for _, currentPrefix := range currentDefinedSet.List {
delete := true
shouldDelete := true
for _, prefix := range iBGPPeerCIDRs {
if currentPrefix == prefix {
delete = false
shouldDelete = false
}
}
if delete {
if shouldDelete {
toDelete = append(toDelete, currentPrefix)
}
}
Expand Down Expand Up @@ -322,13 +322,13 @@ func (nrc *NetworkRoutingController) addAllBGPPeersDefinedSet(iBGPPeerCIDRs, ext
}
}
for _, currentPeer := range currentDefinedSet.List {
delete := true
shouldDelete := true
for _, peer := range allBgpPeers {
if peer == currentPeer {
delete = false
shouldDelete = false
}
}
if delete {
if shouldDelete {
toDelete = append(toDelete, currentPeer)
}
}
Expand Down

0 comments on commit 0faf772

Please sign in to comment.