code: func (m *Mapper) InfoForObject(obj runtime.Object) (*Info, error) {
  	groupVersionKind, err := m.ObjectKind(obj)
  	if err != nil {
  		return nil, fmt.Errorf("unable to get type info from the object %q: %v", reflect.TypeOf(obj), err)
  	}
  	mapping, err := m.RESTMapping(groupVersionKind.GroupKind(), groupVersionKind.Version)
  	if err != nil {
  		return nil, fmt.Errorf("unable to recognize %v: %v", groupVersionKind, err)
  	}
  	client, err := m.ClientForMapping(mapping)
  	if err != nil {
  		return nil, fmt.Errorf("unable to connect to a server to handle %q: %v", mapping.Resource, err)
  	}
  	name, _ := mapping.MetadataAccessor.Name(obj)
  	namespace, _ := mapping.MetadataAccessor.Namespace(obj)
  	resourceVersion, _ := mapping.MetadataAccessor.ResourceVersion(obj)
  	return &Info{
  		Mapping:   mapping,
  		Client:    client,
  		Namespace: namespace,
  		Name:      name,
  
  		Object:          obj,
  		ResourceVersion: resourceVersion,
  	}, nil
  }
docs: // InfoForObject creates an Info object for the given Object. An error is returned
  // if the object cannot be introspected. Name and namespace will be set into Info
  // if the mapping's MetadataAccessor can retrieve them.