From 00ce2bb1b4a1d73dfbbe50b98a8aeb498b12ac1c Mon Sep 17 00:00:00 2001 From: Weston Haught Date: Tue, 12 May 2020 10:28:03 -0500 Subject: [PATCH] krshaped should be part of genereconciler (#1326) --- .../cmd/injection-gen/generators/packages.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/codegen/cmd/injection-gen/generators/packages.go b/codegen/cmd/injection-gen/generators/packages.go index 287257069..dc566a7c4 100644 --- a/codegen/cmd/injection-gen/generators/packages.go +++ b/codegen/cmd/injection-gen/generators/packages.go @@ -202,6 +202,15 @@ func extractReconcilerClassTag(tags map[string]map[string]string) (string, bool) return classname, has } +func isKRShaped(tags map[string]map[string]string) bool { + vals, has := tags["genreconciler"] + if !has { + return false + } + shaped, _ := vals["krshapedlogic"] + return shaped == "true" +} + func isNonNamespaced(tags map[string]map[string]string) bool { vals, has := tags["genclient"] if !has { @@ -211,15 +220,6 @@ func isNonNamespaced(tags map[string]map[string]string) bool { return has } -func isKRShaped(tags map[string]map[string]string) bool { - vals, has := tags["genclient"] - if !has { - return false - } - shaped, _ := vals["krshapedlogic"] - return shaped == "true" -} - func vendorless(p string) string { if pos := strings.LastIndex(p, "/vendor/"); pos != -1 { return p[pos+len("/vendor/"):]