krshaped should be part of genereconciler (#1326)

This commit is contained in:
Weston Haught 2020-05-12 10:28:03 -05:00 committed by GitHub
parent de5c590700
commit 00ce2bb1b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 9 deletions

View File

@ -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/"):]