Skip to content

Commit

Permalink
Little optimization
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Aug 30, 2024
1 parent 925fc2a commit 0c9f02c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/graph/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ func (r *Reconciler) Reconcile(ctx context.Context, req reconcile.Request) (reco
}

func IsDiscoveryError(err error) bool {
if errors.Is(err, &discovery.ErrGroupDiscoveryFailed{}) {
var errRDF *apiutil.ErrResourceDiscoveryFailed
if errors.As(err, &errRDF) {
return true
}
var errRDF *apiutil.ErrResourceDiscoveryFailed
return errors.As(err, &errRDF)
return errors.Is(err, &discovery.ErrGroupDiscoveryFailed{})
}

// SetupWithManager sets up the controller with the Manager.
Expand Down

0 comments on commit 0c9f02c

Please sign in to comment.