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 (
25
25
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
26
26
"k8s.io/apimachinery/pkg/conversion/queryparams"
27
27
"k8s.io/apimachinery/pkg/runtime/schema"
28
+ "k8s.io/utils/ptr"
28
29
)
29
30
30
31
type namedString string
@@ -161,20 +162,20 @@ func TestConvert(t *testing.T) {
161
162
},
162
163
{
163
164
input : & baz {
164
- Ptr : intp (5 ),
165
- Bptr : boolp (true ),
165
+ Ptr : ptr . To (5 ),
166
+ Bptr : ptr . To (true ),
166
167
},
167
168
expected : url.Values {"ptr" : {"5" }, "bptr" : {"true" }},
168
169
},
169
170
{
170
171
input : & baz {
171
- Bptr : boolp (true ),
172
+ Bptr : ptr . To (true ),
172
173
},
173
174
expected : url.Values {"ptr" : {"" }, "bptr" : {"true" }},
174
175
},
175
176
{
176
177
input : & baz {
177
- Ptr : intp (5 ),
178
+ Ptr : ptr . To (5 ),
178
179
},
179
180
expected : url.Values {"ptr" : {"5" }},
180
181
},
@@ -213,7 +214,3 @@ func TestConvert(t *testing.T) {
213
214
validateResult (t , test .input , result , test .expected )
214
215
}
215
216
}
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