mirror of https://github.com/knative/pkg.git
krshaped should be part of genereconciler (#1326)
This commit is contained in:
parent
de5c590700
commit
00ce2bb1b4
|
@ -202,6 +202,15 @@ func extractReconcilerClassTag(tags map[string]map[string]string) (string, bool)
|
||||||
return classname, has
|
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 {
|
func isNonNamespaced(tags map[string]map[string]string) bool {
|
||||||
vals, has := tags["genclient"]
|
vals, has := tags["genclient"]
|
||||||
if !has {
|
if !has {
|
||||||
|
@ -211,15 +220,6 @@ func isNonNamespaced(tags map[string]map[string]string) bool {
|
||||||
return has
|
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 {
|
func vendorless(p string) string {
|
||||||
if pos := strings.LastIndex(p, "/vendor/"); pos != -1 {
|
if pos := strings.LastIndex(p, "/vendor/"); pos != -1 {
|
||||||
return p[pos+len("/vendor/"):]
|
return p[pos+len("/vendor/"):]
|
||||||
|
|
Loading…
Reference in New Issue