code: func (m *DefaultRESTMapper) ResourceSingularizer(resourceType string) (string, error) {
  	partialResource := unversioned.GroupVersionResource{Resource: resourceType}
  	resources, err := m.ResourcesFor(partialResource)
  	if err != nil {
  		return resourceType, err
  	}
  
  	singular := unversioned.GroupVersionResource{}
  	for _, curr := range resources {
  		currSingular, ok := m.pluralToSingular[curr]
  		if !ok {
  			continue
  		}
  		if singular.IsEmpty() {
  			singular = currSingular
  			continue
  		}
  
  		if currSingular.Resource != singular.Resource {
  			return resourceType, fmt.Errorf("multiple possibile singular resources (%v) found for %v", resources, resourceType)
  		}
  	}
  
  	if singular.IsEmpty() {
  		return resourceType, fmt.Errorf("no singular of resource %v has been defined", resourceType)
  	}
  
  	return singular.Resource, nil
  }
docs: // ResourceSingularizer implements RESTMapper
  // It converts a resource name from plural to singular (e.g., from pods to pod)