diff --git a/pkg/apis/core/helper/helpers.go b/pkg/apis/core/helper/helpers.go index 0c730aa6d52..4cdbae98002 100644 --- a/pkg/apis/core/helper/helpers.go +++ b/pkg/apis/core/helper/helpers.go @@ -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 diff --git a/pkg/apis/core/v1/helper/helpers.go b/pkg/apis/core/v1/helper/helpers.go index fbc733d09cc..be33b1f94c7 100644 --- a/pkg/apis/core/v1/helper/helpers.go +++ b/pkg/apis/core/v1/helper/helpers.go @@ -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