From 04f61a6fb93e9c9f390fb6c5f4366127b645dba3 Mon Sep 17 00:00:00 2001 From: Christoph Mewes Date: Tue, 10 Feb 2026 11:54:05 +0100 Subject: [PATCH] unexport function On-behalf-of: @SAP christoph.mewes@sap.com --- internal/manifest/applier.go | 2 +- internal/manifest/readiness.go | 4 ++-- internal/manifest/readiness_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/manifest/applier.go b/internal/manifest/applier.go index 00e8b67..75524d7 100644 --- a/internal/manifest/applier.go +++ b/internal/manifest/applier.go @@ -75,7 +75,7 @@ func (a *applier) Apply(ctx context.Context, client ctrlruntimeclient.Client, ob return false, err } - if !HasCondition(current, conditionType) { + if !hasCondition(current, conditionType) { logger := a.objectLogger(ctx, object) logger.Debugw("Waiting for condition", "condition", conditionType) requeue = true diff --git a/internal/manifest/readiness.go b/internal/manifest/readiness.go index cb643d2..804bb68 100644 --- a/internal/manifest/readiness.go +++ b/internal/manifest/readiness.go @@ -20,9 +20,9 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" ) -// HasCondition checks if an unstructured object has the specified condition +// hasCondition checks if an unstructured object has the specified condition // type with status "True". -func HasCondition(obj *unstructured.Unstructured, conditionType string) bool { +func hasCondition(obj *unstructured.Unstructured, conditionType string) bool { conditions, found, err := unstructured.NestedSlice(obj.Object, "status", "conditions") if err != nil || !found { return false diff --git a/internal/manifest/readiness_test.go b/internal/manifest/readiness_test.go index cf99f61..1b2ed0f 100644 --- a/internal/manifest/readiness_test.go +++ b/internal/manifest/readiness_test.go @@ -130,7 +130,7 @@ func TestHasCondition(t *testing.T) { for _, tt := range testcases { t.Run(tt.name, func(t *testing.T) { - result := HasCondition(tt.obj, tt.conditionType) + result := hasCondition(tt.obj, tt.conditionType) if result != tt.expected { t.Fatalf("Expected %v.", tt.expected) }