Skip to content

Commit

Permalink
Fix lint: remove unnecessary guard around call to delete
Browse files Browse the repository at this point in the history
Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
  • Loading branch information
chetan-rns committed Mar 24, 2022
1 parent ed047d4 commit 5b257f8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/cache/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1008,9 +1008,7 @@ func (c *clusterCache) onNodeUpdated(oldRes *Resource, newRes *Resource) {
}

func (c *clusterCache) onNodeRemoved(key kube.ResourceKey) {
if _, ok := c.childrenByParent[key]; ok {
delete(c.childrenByParent, key)
}
delete(c.childrenByParent, key)
existing, ok := c.resources[key]
if ok {
delete(c.resources, key)
Expand Down

0 comments on commit 5b257f8

Please sign in to comment.