Skip to content

Commit

Permalink
Use errors.Is to compare
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Ruan <xin.ruan@sap.com>
  • Loading branch information
ruanxin committed Dec 14, 2022
1 parent f01486a commit a2b9828
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kube/client.go
Expand Up @@ -325,8 +325,8 @@ func (c *Client) Delete(resources ResourceList) (*Result, []error) {
return nil
})
if err != nil {
if err == ErrNoObjectsVisited {
err = fmt.Errorf("object not found, skipping delete: %w", ErrNoObjectsVisited)
if errors.Is(err, ErrNoObjectsVisited) {
err = fmt.Errorf("object not found, skipping delete: %w", err)
}
errs = append(errs, err)
}
Expand Down

0 comments on commit a2b9828

Please sign in to comment.