code: func (o *CanIOptions) RunAccessCheck() (bool, error) {
  	var sar *authorizationv1.SelfSubjectAccessReview
  	if o.NonResourceURL == "" {
  		sar = &authorizationv1.SelfSubjectAccessReview{
  			Spec: authorizationv1.SelfSubjectAccessReviewSpec{
  				ResourceAttributes: &authorizationv1.ResourceAttributes{
  					Namespace:   o.Namespace,
  					Verb:        o.Verb,
  					Group:       o.Resource.Group,
  					Resource:    o.Resource.Resource,
  					Subresource: o.Subresource,
  					Name:        o.ResourceName,
  				},
  			},
  		}
  	} else {
  		sar = &authorizationv1.SelfSubjectAccessReview{
  			Spec: authorizationv1.SelfSubjectAccessReviewSpec{
  				NonResourceAttributes: &authorizationv1.NonResourceAttributes{
  					Verb: o.Verb,
  					Path: o.NonResourceURL,
  				},
  			},
  		}
  	}
  
  	response, err := o.AuthClient.SelfSubjectAccessReviews().Create(sar)
  	if err != nil {
  		return false, err
  	}
  
  	if response.Status.Allowed {
  		fmt.Fprintln(o.Out, "yes")
  	} else {
  		fmt.Fprint(o.Out, "no")
  		if len(response.Status.Reason) > 0 {
  			fmt.Fprintf(o.Out, " - %v", response.Status.Reason)
  		}
  		if len(response.Status.EvaluationError) > 0 {
  			fmt.Fprintf(o.Out, " - %v", response.Status.EvaluationError)
  		}
  		fmt.Fprintln(o.Out)
  	}
  
  	return response.Status.Allowed, nil
  }
docs: // RunAccessCheck checks if user has access to a certain resource or non resource URL