34
34
Ports : []discoveryV1.EndpointPort {
35
35
{
36
36
Name : & svcPortName ,
37
- Port : helpers .GetInt32Pointer ( 80 ),
37
+ Port : helpers .GetPointer ( int32 ( 80 ) ),
38
38
},
39
39
},
40
40
}
54
54
Ports : []discoveryV1.EndpointPort {
55
55
{
56
56
Name : & svcPortName ,
57
- Port : helpers .GetInt32Pointer ( 80 ),
57
+ Port : helpers .GetPointer ( int32 ( 80 ) ),
58
58
},
59
59
},
60
60
}
65
65
Ports : []discoveryV1.EndpointPort {
66
66
{
67
67
Name : & svcPortName ,
68
- Port : helpers .GetInt32Pointer ( 80 ),
68
+ Port : helpers .GetPointer ( int32 ( 80 ) ),
69
69
},
70
70
},
71
71
}
76
76
Ports : []discoveryV1.EndpointPort {
77
77
{
78
78
Name : helpers .GetStringPointer ("other-svc-port" ),
79
- Port : helpers .GetInt32Pointer ( 8080 ),
79
+ Port : helpers .GetPointer ( int32 ( 8080 ) ),
80
80
},
81
81
},
82
82
}
@@ -387,7 +387,7 @@ func TestFindPort(t *testing.T) {
387
387
ports : []discoveryV1.EndpointPort {
388
388
{
389
389
Name : nil ,
390
- Port : helpers .GetInt32Pointer ( 8080 ),
390
+ Port : helpers .GetPointer ( int32 ( 8080 ) ),
391
391
},
392
392
},
393
393
svcPort : v1.ServicePort {
@@ -402,15 +402,15 @@ func TestFindPort(t *testing.T) {
402
402
ports : []discoveryV1.EndpointPort {
403
403
{
404
404
Name : helpers .GetStringPointer ("other-svc-port" ),
405
- Port : helpers .GetInt32Pointer ( 8080 ),
405
+ Port : helpers .GetPointer ( int32 ( 8080 ) ),
406
406
},
407
407
{
408
408
Name : helpers .GetStringPointer ("other-svc-port2" ),
409
- Port : helpers .GetInt32Pointer ( 8081 ),
409
+ Port : helpers .GetPointer ( int32 ( 8081 ) ),
410
410
},
411
411
{
412
412
Name : helpers .GetStringPointer ("other-svc-port3" ),
413
- Port : helpers .GetInt32Pointer ( 8082 ),
413
+ Port : helpers .GetPointer ( int32 ( 8082 ) ),
414
414
},
415
415
},
416
416
svcPort : v1.ServicePort {
@@ -425,15 +425,15 @@ func TestFindPort(t *testing.T) {
425
425
ports : []discoveryV1.EndpointPort {
426
426
{
427
427
Name : helpers .GetStringPointer ("other-svc-port" ),
428
- Port : helpers .GetInt32Pointer ( 8080 ),
428
+ Port : helpers .GetPointer ( int32 ( 8080 ) ),
429
429
},
430
430
{
431
431
Name : helpers .GetStringPointer ("other-svc-port2" ),
432
- Port : helpers .GetInt32Pointer ( 8081 ),
432
+ Port : helpers .GetPointer ( int32 ( 8081 ) ),
433
433
},
434
434
{
435
435
Name : & svcPortName , // match
436
- Port : helpers .GetInt32Pointer ( 8082 ),
436
+ Port : helpers .GetPointer ( int32 ( 8082 ) ),
437
437
},
438
438
},
439
439
svcPort : v1.ServicePort {
@@ -449,7 +449,7 @@ func TestFindPort(t *testing.T) {
449
449
{
450
450
// If a service port is unnamed (empty string), then the endpoint port will also be empty string.
451
451
Name : helpers .GetStringPointer ("" ),
452
- Port : helpers .GetInt32Pointer ( 8080 ),
452
+ Port : helpers .GetPointer ( int32 ( 8080 ) ),
453
453
},
454
454
},
455
455
svcPort : v1.ServicePort {
0 commit comments