Skip to content

Commit 2cdd390

Browse files
committed
Use k8s.io/utils/pointer in util_test.go
Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
1 parent ecc03ff commit 2cdd390

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

controllers/workspace/util_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
. "github.com/onsi/ginkgo/v2"
2626
. "github.com/onsi/gomega"
2727
corev1 "k8s.io/api/core/v1"
28+
"k8s.io/utils/pointer"
2829
crclient "sigs.k8s.io/controller-runtime/pkg/client"
2930

3031
appsv1 "k8s.io/api/apps/v1"
@@ -224,14 +225,13 @@ func scaleDeploymentToZero(deploymentName string) {
224225
}
225226

226227
func devworkspaceOwnerRef(wksp *dw.DevWorkspace) metav1.OwnerReference {
227-
boolTrue := true
228228
return metav1.OwnerReference{
229229
APIVersion: "workspace.devfile.io/v1alpha2",
230230
Kind: "DevWorkspace",
231231
Name: wksp.Name,
232232
UID: wksp.UID,
233-
Controller: &boolTrue,
234-
BlockOwnerDeletion: &boolTrue,
233+
Controller: pointer.BoolPtr(true),
234+
BlockOwnerDeletion: pointer.BoolPtr(true),
235235
}
236236
}
237237

0 commit comments

Comments
 (0)