Skip to content

Commit

Permalink
Fix linter bug
Browse files Browse the repository at this point in the history
Signed-off-by: Nadia Pinaeva <[email protected]>
  • Loading branch information
npinaeva authored and jcaamano committed Nov 29, 2023
1 parent f375e49 commit 65ab2b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@ func newAPBRouteManager(lister adminpolicybasedroutelisters.AdminPolicyBasedExte
}
}

//lint:ignore U1000 generic interfaces throw false-positives https://github.com/dominikh/go-tools/issues/1440
func (m *apbRouteManager) get(namespace, name string) (*adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute, error) {
return m.lister.Get(name)
}

//lint:ignore U1000 generic interfaces throw false-positives
func (m *apbRouteManager) getMessages(route *adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute) []string {
return route.Status.Messages
}

//lint:ignore U1000 generic interfaces throw false-positives
func (m *apbRouteManager) updateStatus(route *adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute, applyOpts *metav1.ApplyOptions,
applyEmptyOrFailed bool) error {
if route == nil {
Expand Down Expand Up @@ -67,6 +70,7 @@ func (m *apbRouteManager) updateStatus(route *adminpolicybasedrouteapi.AdminPoli
return err
}

//lint:ignore U1000 generic interfaces throw false-positives
func (m *apbRouteManager) cleanupStatus(route *adminpolicybasedrouteapi.AdminPolicyBasedExternalRoute, applyOpts *metav1.ApplyOptions) error {
applyObj := adminpolicybasedrouteapply.AdminPolicyBasedExternalRoute(route.Name).
WithStatus(adminpolicybasedrouteapply.AdminPolicyBasedRouteStatus())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@ func newEgressFirewallManager(lister egressfirewalllisters.EgressFirewallLister,
}
}

//lint:ignore U1000 generic interfaces throw false-positives https://github.com/dominikh/go-tools/issues/1440
func (m *egressFirewallManager) get(namespace, name string) (*egressfirewallapi.EgressFirewall, error) {
return m.lister.EgressFirewalls(namespace).Get(name)
}

//lint:ignore U1000 generic interfaces throw false-positives
func (m *egressFirewallManager) getMessages(egressFirewall *egressfirewallapi.EgressFirewall) []string {
return egressFirewall.Status.Messages
}

//lint:ignore U1000 generic interfaces throw false-positives
func (m *egressFirewallManager) updateStatus(egressFirewall *egressfirewallapi.EgressFirewall, applyOpts *metav1.ApplyOptions,
applyEmptyOrFailed bool) error {
if egressFirewall == nil {
Expand Down Expand Up @@ -66,6 +69,7 @@ func (m *egressFirewallManager) updateStatus(egressFirewall *egressfirewallapi.E
return err
}

//lint:ignore U1000 generic interfaces throw false-positives
func (m *egressFirewallManager) cleanupStatus(egressFirewall *egressfirewallapi.EgressFirewall, applyOpts *metav1.ApplyOptions) error {
applyObj := egressfirewallapply.EgressFirewall(egressFirewall.Name, egressFirewall.Namespace).
WithStatus(egressfirewallapply.EgressFirewallStatus())
Expand Down

0 comments on commit 65ab2b2

Please sign in to comment.