code: func (o *CanIOptions) Complete(f cmdutil.Factory, args []string) error {
  	if o.List {
  		if len(args) != 0 {
  			return errors.New("list option must be specified with no arguments")
  		}
  	} else {
  		if o.Quiet {
  			o.Out = ioutil.Discard
  		}
  
  		switch len(args) {
  		case 2:
  			o.Verb = args[0]
  			if strings.HasPrefix(args[1], "/") {
  				o.NonResourceURL = args[1]
  				break
  			}
  			resourceTokens := strings.SplitN(args[1], "/", 2)
  			restMapper, err := f.ToRESTMapper()
  			if err != nil {
  				return err
  			}
  			o.Resource = o.resourceFor(restMapper, resourceTokens[0])
  			if len(resourceTokens) > 1 {
  				o.ResourceName = resourceTokens[1]
  			}
  		default:
  			return errors.New("you must specify two or three arguments: verb, resource, and optional resourceName")
  		}
  	}
  
  	var err error
  	client, err := f.KubernetesClientSet()
  	if err != nil {
  		return err
  	}
  	o.AuthClient = client.AuthorizationV1()
  	o.DiscoveryClient = client.Discovery()
  	o.Namespace = ""
  	if !o.AllNamespaces {
  		o.Namespace, _, err = f.ToRawKubeConfigLoader().Namespace()
  		if err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Complete completes all the required options