From c55354d5a180c3304b9ef593165342bffad72d4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charles-Edouard=20Br=C3=A9t=C3=A9ch=C3=A9?= Date: Fri, 7 Mar 2025 11:21:49 +0100 Subject: [PATCH] chore: remove unused code (#12325) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Charles-Edouard Brétéché --- pkg/cel/utils/convert.go | 9 --------- pkg/cel/utils/convert_test.go | 4 +--- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/pkg/cel/utils/convert.go b/pkg/cel/utils/convert.go index 5c329d6e0b..a37a0271c3 100644 --- a/pkg/cel/utils/convert.go +++ b/pkg/cel/utils/convert.go @@ -30,12 +30,3 @@ func ConvertObjectToUnstructured(obj any) (*unstructured.Unstructured, error) { } return &unstructured.Unstructured{Object: ret}, nil } - -func ConvertBytesToUnstructuredList(b []byte) (*unstructured.UnstructuredList, error) { - list := &unstructured.UnstructuredList{} - err := list.UnmarshalJSON(b) - if err != nil { - return nil, err - } - return list, nil -} diff --git a/pkg/cel/utils/convert_test.go b/pkg/cel/utils/convert_test.go index 9dd8e62b78..3f2ad758e8 100644 --- a/pkg/cel/utils/convert_test.go +++ b/pkg/cel/utils/convert_test.go @@ -78,9 +78,7 @@ func TestConvertObjectToUnstructured(t *testing.T) { "status": map[string]any{}, }, }, - }, - // TODO: Add test cases. - } + }} for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := ConvertObjectToUnstructured(tt.obj)