code: func KindToResource(kind unversioned.GroupVersionKind, mixedCase bool) (plural, singular unversioned.GroupVersionResource) {
  	kindName := kind.Kind
  	if len(kindName) == 0 {
  		return
  	}
  	if mixedCase {
  		// Legacy support for mixed case names
  		singular = kind.GroupVersion().WithResource(strings.ToLower(kindName[:1]) + kindName[1:])
  	} else {
  		singular = kind.GroupVersion().WithResource(strings.ToLower(kindName))
  	}
  
  	singularName := singular.Resource
  	if strings.HasSuffix(singularName, "endpoints") {
  		plural = singular
  	} else {
  		switch string(singularName[len(singularName)-1]) {
  		case "s":
  			plural = kind.GroupVersion().WithResource(singularName + "es")
  		case "y":
  			plural = kind.GroupVersion().WithResource(strings.TrimSuffix(singularName, "y") + "ies")
  		default:
  			plural = kind.GroupVersion().WithResource(singularName + "s")
  		}
  	}
  	return
  }
docs: // KindToResource converts Kind to a resource name.