code: func NewCmdSelector(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command {
  	o := NewSelectorOptions(streams)
  
  	cmd := &cobra.Command{
  		Use:                   "selector (-f FILENAME | TYPE NAME) EXPRESSIONS [--resource-version=version]",
  		DisableFlagsInUseLine: true,
  		Short:                 i18n.T("Set the selector on a resource"),
  		Long:                  fmt.Sprintf(selectorLong, validation.LabelValueMaxLength),
  		Example:               selectorExample,
  		Run: func(cmd *cobra.Command, args []string) {
  			cmdutil.CheckErr(o.Complete(f, cmd, args))
  			cmdutil.CheckErr(o.Validate())
  			cmdutil.CheckErr(o.RunSelector())
  		},
  	}
  
  	o.ResourceBuilderFlags.AddFlags(cmd.Flags())
  	o.PrintFlags.AddFlags(cmd)
  	o.RecordFlags.AddFlags(cmd)
  
  	cmd.Flags().String("resource-version", "", "If non-empty, the selectors update will only succeed if this is the current resource-version for the object. Only valid when specifying a single resource.")
  	cmdutil.AddDryRunFlag(cmd)
  
  	return cmd
  }
docs: // NewCmdSelector is the "set selector" command.