Skip to content

Commit cbc1ac2

Browse files
committed
harmonize import aliases
1 parent d5a56ef commit cbc1ac2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/component/reference.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"strings"
1313

1414
corev1 "k8s.io/api/core/v1"
15-
"k8s.io/apimachinery/pkg/types"
15+
apitypes "k8s.io/apimachinery/pkg/types"
1616
"sigs.k8s.io/controller-runtime/pkg/client"
1717

1818
"github.com/sap/component-operator-runtime/internal/walk"
@@ -29,7 +29,7 @@ type ConfigMapReference struct {
2929

3030
func (r *ConfigMapReference) load(ctx context.Context, client client.Client, namespace string) error {
3131
configMap := &corev1.ConfigMap{}
32-
if err := client.Get(ctx, types.NamespacedName{Namespace: namespace, Name: r.Name}, configMap); err != nil {
32+
if err := client.Get(ctx, apitypes.NamespacedName{Namespace: namespace, Name: r.Name}, configMap); err != nil {
3333
return err
3434
}
3535
r.data = configMap.Data
@@ -54,7 +54,7 @@ type ConfigMapKeyReference struct {
5454

5555
func (r *ConfigMapKeyReference) load(ctx context.Context, client client.Client, namespace string, fallbackKeys ...string) error {
5656
configMap := &corev1.ConfigMap{}
57-
if err := client.Get(ctx, types.NamespacedName{Namespace: namespace, Name: r.Name}, configMap); err != nil {
57+
if err := client.Get(ctx, apitypes.NamespacedName{Namespace: namespace, Name: r.Name}, configMap); err != nil {
5858
return err
5959
}
6060
if r.Key != "" {
@@ -91,7 +91,7 @@ type SecretReference struct {
9191

9292
func (r *SecretReference) load(ctx context.Context, client client.Client, namespace string) error {
9393
secret := &corev1.Secret{}
94-
if err := client.Get(ctx, types.NamespacedName{Namespace: namespace, Name: r.Name}, secret); err != nil {
94+
if err := client.Get(ctx, apitypes.NamespacedName{Namespace: namespace, Name: r.Name}, secret); err != nil {
9595
return err
9696
}
9797
r.data = secret.Data
@@ -116,7 +116,7 @@ type SecretKeyReference struct {
116116

117117
func (r *SecretKeyReference) load(ctx context.Context, client client.Client, namespace string, fallbackKeys ...string) error {
118118
secret := &corev1.Secret{}
119-
if err := client.Get(ctx, types.NamespacedName{Namespace: namespace, Name: r.Name}, secret); err != nil {
119+
if err := client.Get(ctx, apitypes.NamespacedName{Namespace: namespace, Name: r.Name}, secret); err != nil {
120120
return err
121121
}
122122
if r.Key != "" {

0 commit comments

Comments
 (0)