From 560cc8b84fbd42697bf5d898308ea91743b01918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Budzy=C5=84ski?= Date: Thu, 19 Dec 2024 11:07:48 +0100 Subject: [PATCH] small ref --- pkg/sdk/poc/generator/show_object_methods.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/sdk/poc/generator/show_object_methods.go b/pkg/sdk/poc/generator/show_object_methods.go index 102f5eb59a..67e00f026f 100644 --- a/pkg/sdk/poc/generator/show_object_methods.go +++ b/pkg/sdk/poc/generator/show_object_methods.go @@ -42,7 +42,7 @@ func (s *Operation) withShowObjectMethods(structName string, showObjectMethodsKi log.Printf("[WARN] struct '%s' does not contain needed fields to build ID() helper method. Create the method manually in _ext file or add missing fields: %v.\n", structName, idTypeParts[id]) continue } - s.ShowObjectMethods = append(s.ShowObjectMethods, newShowObjectIDMethod(structName, s.HelperStructs, id)) + s.ShowObjectMethods = append(s.ShowObjectMethods, newShowObjectIDMethod(structName, id)) case ShowObjectTypeMethod: s.ShowObjectMethods = append(s.ShowObjectMethods, newShowObjectTypeMethod(structName)) default: @@ -84,7 +84,7 @@ func containsFieldNames(fields []*Field, names ...string) bool { return true } -func newShowObjectIDMethod(structName string, helperStructs []*Field, idType objectIdentifierKind) *ShowObjectMethod { +func newShowObjectIDMethod(structName string, idType objectIdentifierKind) *ShowObjectMethod { requiredFields := idTypeParts[idType] var args string for _, field := range requiredFields {