code: func (f *Factory) PrintObject(cmd *cobra.Command, obj runtime.Object, out io.Writer) error {
  	mapper, _ := f.Object()
  	gvk, err := api.Scheme.ObjectKind(obj)
  	if err != nil {
  		return err
  	}
  
  	mapping, err := mapper.RESTMapping(gvk.GroupKind())
  	if err != nil {
  		return err
  	}
  
  	printer, err := f.PrinterForMapping(cmd, mapping, false)
  	if err != nil {
  		return err
  	}
  	return printer.PrintObj(obj, out)
  }
docs: // PrintObject prints an api object given command line flags to modify the output format