Skip to content

Commit

Permalink
chore: Fix linting issues with 1.58.2 (#1096)
Browse files Browse the repository at this point in the history
  • Loading branch information
k15r authored May 21, 2024
1 parent 56ae4db commit 1202621
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/k8sutils/owner_reference_setter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package k8sutils

import (
"context"
"errors"
"fmt"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -12,6 +13,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
)

var ErrNotImplemented = errors.New("not implemented")

// NewOwnerReferenceSetter wraps an existing Kubernetes client with additional functionality
// to set the owner reference for objects before they are created or updated.
// It returns a new client that, when used for Create or Update operations, will automatically
Expand Down Expand Up @@ -40,7 +43,7 @@ type noopWatchClient struct {
}

func (n *noopWatchClient) Watch(_ context.Context, _ client.ObjectList, _ ...client.ListOption) (watch.Interface, error) {
return nil, nil
return nil, ErrNotImplemented
}

func setOwnerReference(owner metav1.Object, ownee client.Object, scheme *runtime.Scheme) error {
Expand Down

0 comments on commit 1202621

Please sign in to comment.