Merge pull request #112712 from RainbowMango/pr_remove_redundant_conversion

Remove redundant type conversion.
This commit is contained in:
Kubernetes Prow Robot
2022-09-26 09:20:31 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -175,7 +175,7 @@ func IsExtendedResourceName(name core.ResourceName) bool {
}
// Ensure it satisfies the rules in IsQualifiedName() after converted into quota resource name
nameForQuota := fmt.Sprintf("%s%s", core.DefaultResourceRequestsPrefix, string(name))
if errs := validation.IsQualifiedName(string(nameForQuota)); len(errs) != 0 {
if errs := validation.IsQualifiedName(nameForQuota); len(errs) != 0 {
return false
}
return true

View File

@@ -39,7 +39,7 @@ func IsExtendedResourceName(name v1.ResourceName) bool {
}
// Ensure it satisfies the rules in IsQualifiedName() after converted into quota resource name
nameForQuota := fmt.Sprintf("%s%s", v1.DefaultResourceRequestsPrefix, string(name))
if errs := validation.IsQualifiedName(string(nameForQuota)); len(errs) != 0 {
if errs := validation.IsQualifiedName(nameForQuota); len(errs) != 0 {
return false
}
return true