Commit d3d33aa8 authored by xilabao's avatar xilabao

remove warning infomation when use '*'

parent dee81ed5
...@@ -180,6 +180,10 @@ func (o *CanIOptions) RunAccessCheck() (bool, error) { ...@@ -180,6 +180,10 @@ func (o *CanIOptions) RunAccessCheck() (bool, error) {
} }
func (o *CanIOptions) resourceFor(mapper meta.RESTMapper, resourceArg string) schema.GroupVersionResource { func (o *CanIOptions) resourceFor(mapper meta.RESTMapper, resourceArg string) schema.GroupVersionResource {
if resourceArg == "*" {
return schema.GroupVersionResource{Resource: resourceArg}
}
fullySpecifiedGVR, groupResource := schema.ParseResourceArg(strings.ToLower(resourceArg)) fullySpecifiedGVR, groupResource := schema.ParseResourceArg(strings.ToLower(resourceArg))
gvr := schema.GroupVersionResource{} gvr := schema.GroupVersionResource{}
if fullySpecifiedGVR != nil { if fullySpecifiedGVR != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment