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
+3 -4
View File
@@ -23,7 +23,6 @@ import (
nbv1alpha1 "github.com/netbirdio/kubernetes-operator/api/v1alpha1"
"github.com/netbirdio/kubernetes-operator/internal/gatewayutil"
"github.com/netbirdio/kubernetes-operator/internal/k8sutil"
"github.com/netbirdio/kubernetes-operator/internal/util"
nbv1alpha1ac "github.com/netbirdio/kubernetes-operator/pkg/applyconfigurations/api/v1alpha1"
)
@@ -148,9 +147,9 @@ func (r *HTTPRouteReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
Domain: string(hostname),
Enabled: true,
Name: string(hostname),
Mode: util.Ptr(api.ServiceRequestModeHttp),
PassHostHeader: util.Ptr(false),
RewriteRedirects: util.Ptr(false),
Mode: new(api.ServiceRequestModeHttp),
PassHostHeader: new(false),
RewriteRedirects: new(false),
Targets: &targets,
}