code: func (p *NamePrinter) PrintObj(obj runtime.Object, w io.Writer) error {
  	gvk, _, _ := p.Typer.ObjectKind(obj)
  
  	if meta.IsListType(obj) {
  		items, err := meta.ExtractList(obj)
  		if err != nil {
  			return err
  		}
  		if errs := runtime.DecodeList(items, p.Decoder, runtime.UnstructuredJSONScheme); len(errs) > 0 {
  			return utilerrors.NewAggregate(errs)
  		}
  		for _, obj := range items {
  			if err := p.PrintObj(obj, w); err != nil {
  				return err
  			}
  		}
  		return nil
  	}
  
  	// TODO: this is wrong, runtime.Unknown and runtime.Unstructured are not handled properly here.
  
  	name := "<unknown>"
  	if acc, err := meta.Accessor(obj); err == nil {
  		if n := acc.GetName(); len(n) > 0 {
  			name = n
  		}
  	}
  
  	if gvk != nil {
  		// TODO: this is wrong, it assumes that meta knows about all Kinds - should take a RESTMapper
  		_, resource := meta.KindToResource(*gvk)
  
  		fmt.Fprintf(w, "%s/%s\n", resource.Resource, name)
  	} else {
  		fmt.Fprintf(w, "<unknown>/%s\n", name)
  	}
  
  	return nil
  }
docs: // PrintObj is an implementation of ResourcePrinter.PrintObj which decodes the object
  // and print "resource/name" pair. If the object is a List, print all items in it.