Skip to content

Commit

Permalink
fixed lint issues related to using k8s.io/utils/pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWeindel committed Feb 12, 2024
1 parent 2ed839c commit e590d9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/lifecycle/actuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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, ", ")
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/controller/lifecycle/dnsprovider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit e590d9e

Please sign in to comment.