Change ObjectKind signature to avoid allocations

We don't need to pass a pointer into SetGroupKindVersion() - a
struct works just as well.
This commit is contained in:
Clayton Coleman
2016-04-30 20:34:40 -04:00
parent bffbc112f0
commit a84e62d9e6
22 changed files with 109 additions and 143 deletions

View File

@@ -149,7 +149,7 @@ func validateOwnerReference(ownerReference api.OwnerReference, fldPath *field.Pa
if len(ownerReference.UID) == 0 {
allErrs = append(allErrs, field.Invalid(fldPath.Child("uid"), ownerReference.UID, "uid must not be empty"))
}
if _, ok := BannedOwners[*gvk]; ok {
if _, ok := BannedOwners[gvk]; ok {
allErrs = append(allErrs, field.Invalid(fldPath, ownerReference, fmt.Sprintf("%s is disallowed from being an owner", gvk)))
}
return allErrs