code: func (o *ResourceBuilderFlags) ToBuilder(restClientGetter RESTClientGetter, resources []string) ResourceFinder {
  	namespace, enforceNamespace, namespaceErr := restClientGetter.ToRawKubeConfigLoader().Namespace()
  
  	builder := resource.NewBuilder(restClientGetter).
  		NamespaceParam(namespace).DefaultNamespace()
  
  	if o.Scheme != nil {
  		builder.WithScheme(o.Scheme, o.Scheme.PrioritizedVersionsAllGroups()...)
  	} else {
  		builder.Unstructured()
  	}
  
  	if o.FileNameFlags != nil {
  		opts := o.FileNameFlags.ToOptions()
  		builder.FilenameParam(enforceNamespace, &opts)
  	}
  
  	if o.Local == nil || !*o.Local {
  		// resource type/name tuples only work non-local
  		if o.All != nil {
  			builder.ResourceTypeOrNameArgs(*o.All, resources...)
  		} else {
  			builder.ResourceTypeOrNameArgs(false, resources...)
  		}
  		// label selectors only work non-local (for now)
  		if o.LabelSelector != nil {
  			builder.LabelSelectorParam(*o.LabelSelector)
  		}
  		// field selectors only work non-local (forever)
  		if o.FieldSelector != nil {
  			builder.FieldSelectorParam(*o.FieldSelector)
  		}
  		// latest only works non-local (forever)
  		if o.Latest {
  			builder.Latest()
  		}
  
  	} else {
  		builder.Local()
  
  		if len(resources) > 0 {
  			builder.AddError(resource.LocalResourceError)
  		}
  	}
  
  	if !o.StopOnFirstError {
  		builder.ContinueOnError()
  	}
  
  	return &ResourceFindBuilderWrapper{
  		builder: builder.
  			Flatten(). // I think we're going to recommend this everywhere
  			AddError(namespaceErr),
  	}
  }
docs: // ToBuilder gives you back a resource finder to visit resources that are located