From 73d67d86132702795685bf43f47ad167c0108b5a Mon Sep 17 00:00:00 2001 From: Jiahui Feng Date: Mon, 15 Apr 2024 14:02:36 -0700 Subject: [PATCH] add trivial FindStructFieldNames to TypeProvider. --- .../src/k8s.io/apiserver/pkg/cel/mutation/typeprovider.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/staging/src/k8s.io/apiserver/pkg/cel/mutation/typeprovider.go b/staging/src/k8s.io/apiserver/pkg/cel/mutation/typeprovider.go index ef9e1f4ee6d..694ed3c08f2 100644 --- a/staging/src/k8s.io/apiserver/pkg/cel/mutation/typeprovider.go +++ b/staging/src/k8s.io/apiserver/pkg/cel/mutation/typeprovider.go @@ -60,6 +60,12 @@ func (p *TypeProvider) FindStructType(structType string) (*types.Type, bool) { return p.underlyingTypeProvider.FindStructType(structType) } +// FindStructFieldNames returns the field names associated with the type, if the type +// is found. +func (p *TypeProvider) FindStructFieldNames(structType string) ([]string, bool) { + return nil, true +} + // FindStructFieldType returns the field type for a checked type value. // Returns false if the field could not be found. func (p *TypeProvider) FindStructFieldType(structType, fieldName string) (*types.FieldType, bool) {