Skip to content

Commit

Permalink
fix: use pointer.Uint32 intead of func()*uint32
Browse files Browse the repository at this point in the history
Signed-off-by: ShyunnY <1147212064@qq.com>
  • Loading branch information
ShyunnY committed Apr 14, 2024
1 parent 231b3b4 commit 1852616
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/utils/pointer"

Check failure on line 22 in internal/infrastructure/kubernetes/ratelimit/resource_provider_test.go

View workflow job for this annotation

GitHub Actions / lint

import 'k8s.io/utils/pointer' is not allowed from list 'main': use k8s.io/utils/ptr instead (depguard)
"k8s.io/utils/ptr"
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
"sigs.k8s.io/yaml"
Expand Down Expand Up @@ -677,10 +678,7 @@ func TestDeployment(t *testing.T) {
},
Telemetry: &egv1a1.RateLimitTelemetry{
Tracing: &egv1a1.RateLimitTracing{
SamplingRate: func() *uint32 {
var samplingRate uint32 = 55
return &samplingRate
}(),
SamplingRate: pointer.Uint32(55),
Provider: &egv1a1.RateLimitTracingProvider{
URL: "trace-collector.envoy-gateway-system.svc.cluster.local:4317",
},
Expand Down

0 comments on commit 1852616

Please sign in to comment.