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
@@ -14,7 +14,6 @@ import (
kerrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/utils/ptr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/builder"
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -126,7 +125,7 @@ func (r *NetworkResourceReconciler) Reconcile(ctx context.Context, req ctrl.Requ
resourceID, err := func() (string, error) {
netReq := api.NetworkResourceRequest{
Name: string(netResource.UID),
Description: ptr.To(svc.Name + "/" + svc.Namespace),
Description: new(svc.Name + "/" + svc.Namespace),
Address: svc.Spec.ClusterIP,
Enabled: true,
Groups: groupIDs,