File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
pkg/conversion/queryparams Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import (
2525 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2626 "k8s.io/apimachinery/pkg/conversion/queryparams"
2727 "k8s.io/apimachinery/pkg/runtime/schema"
28+ "k8s.io/utils/ptr"
2829)
2930
3031type namedString string
@@ -161,20 +162,20 @@ func TestConvert(t *testing.T) {
161162 },
162163 {
163164 input : & baz {
164- Ptr : intp (5 ),
165- Bptr : boolp (true ),
165+ Ptr : ptr . To (5 ),
166+ Bptr : ptr . To (true ),
166167 },
167168 expected : url.Values {"ptr" : {"5" }, "bptr" : {"true" }},
168169 },
169170 {
170171 input : & baz {
171- Bptr : boolp (true ),
172+ Bptr : ptr . To (true ),
172173 },
173174 expected : url.Values {"ptr" : {"" }, "bptr" : {"true" }},
174175 },
175176 {
176177 input : & baz {
177- Ptr : intp (5 ),
178+ Ptr : ptr . To (5 ),
178179 },
179180 expected : url.Values {"ptr" : {"5" }},
180181 },
@@ -213,7 +214,3 @@ func TestConvert(t *testing.T) {
213214 validateResult (t , test .input , result , test .expected )
214215 }
215216}
216-
217- func intp (n int ) * int { return & n }
218-
219- func boolp (b bool ) * bool { return & b }
You can’t perform that action at this time.
0 commit comments