mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Remove redundant type conversion.
Signed-off-by: RainbowMango <qdurenhongcai@gmail.com>
This commit is contained in:
parent
ed8c302cc6
commit
de09b70f69
@ -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