Modernize for Go 1.26 (#232)

This change replaces all uses of pointer utils with the new `new`
function which does the same job.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
Philip Laine
2026-05-05 13:53:44 +02:00
committed by GitHub
parent 69afe3aade
commit ea9f1cb081
14 changed files with 71 additions and 88 deletions
+2 -3
View File
@@ -12,7 +12,6 @@ import (
corev1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
corev1ac "k8s.io/client-go/applyconfigurations/core/v1"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
@@ -126,9 +125,9 @@ func (r *SetupKeyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (c
expiresIn = int(setupKey.Spec.Duration.Seconds())
}
setupKeyReq := api.PostApiSetupKeysJSONRequestBody{
AllowExtraDnsLabels: ptr.To(false),
AllowExtraDnsLabels: new(false),
AutoGroups: autoGroupIDs,
Ephemeral: ptr.To(setupKey.Spec.Ephemeral),
Ephemeral: new(setupKey.Spec.Ephemeral),
ExpiresIn: expiresIn,
Name: setupKey.Spec.Name,
Type: "reusable",