Replace raw string with const var.

This commit is contained in:
Klaus Ma 2017-01-05 19:11:27 +08:00
parent f8b708385e
commit 1586c2f463

View File

@ -3267,7 +3267,7 @@ func ValidateResourceQuotaUpdate(newResourceQuota, oldResourceQuota *api.Resourc
oldScopes.Insert(string(scope)) oldScopes.Insert(string(scope))
} }
if !oldScopes.Equal(newScopes) { if !oldScopes.Equal(newScopes) {
allErrs = append(allErrs, field.Invalid(fldPath, newResourceQuota.Spec.Scopes, "field is immutable")) allErrs = append(allErrs, field.Invalid(fldPath, newResourceQuota.Spec.Scopes, fieldImmutableErrorMsg))
} }
newResourceQuota.Status = oldResourceQuota.Status newResourceQuota.Status = oldResourceQuota.Status