mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Merge pull request #112712 from RainbowMango/pr_remove_redundant_conversion
Remove redundant type conversion.
This commit is contained in:
commit
dd160deedb
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user