From e590d9edc1c9ebea1d085b58b51e6f5fe9f0135f Mon Sep 17 00:00:00 2001 From: Martin Weindel Date: Mon, 12 Feb 2024 12:32:00 +0100 Subject: [PATCH] fixed lint issues related to using k8s.io/utils/pointer --- pkg/controller/lifecycle/actuator.go | 4 ++-- pkg/controller/lifecycle/dnsprovider_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/controller/lifecycle/actuator.go b/pkg/controller/lifecycle/actuator.go index 80f902cae..e181dc095 100644 --- a/pkg/controller/lifecycle/actuator.go +++ b/pkg/controller/lifecycle/actuator.go @@ -53,7 +53,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/apimachinery/pkg/runtime/serializer/yaml" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/manager" @@ -730,7 +730,7 @@ func (a *actuator) collectProviderDetailsOnDeletingDNSEntries(ctx context.Contex status = append(status, fmt.Sprintf("error on retrieving status of provider %s: %s", k, err)) continue } - status = append(status, fmt.Sprintf("provider %s has status: %s", name, pointer.StringDeref(provider.Status.Message, "unknwon"))) + status = append(status, fmt.Sprintf("provider %s has status: %s", name, ptr.Deref(provider.Status.Message, "unknwon"))) } return strings.Join(status, ", ") } diff --git a/pkg/controller/lifecycle/dnsprovider_test.go b/pkg/controller/lifecycle/dnsprovider_test.go index 392d01172..6f4c68969 100644 --- a/pkg/controller/lifecycle/dnsprovider_test.go +++ b/pkg/controller/lifecycle/dnsprovider_test.go @@ -36,7 +36,7 @@ import ( apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/utils/pointer" + "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" logf "sigs.k8s.io/controller-runtime/pkg/log" @@ -227,7 +227,7 @@ var _ = Describe("#DNSProvider", func() { It("should return error when it's not ready", func() { expected.Status.State = "dummy-not-ready" - expected.Status.Message = pointer.String("some-error-message") + expected.Status.Message = ptr.To("some-error-message") Expect(c.Create(ctx, expected)).ToNot(HaveOccurred(), "adding pre-existing emptyProvider succeeds")