code: func IndexFuncToKeyFuncAdapter(indexFunc IndexFunc) KeyFunc {
  	return func(obj interface{}) (string, error) {
  		indexKeys, err := indexFunc(obj)
  		if err != nil {
  			return "", err
  		}
  		if len(indexKeys) > 1 {
  			return "", fmt.Errorf("too many keys: %v", indexKeys)
  		}
  		if len(indexKeys) == 0 {
  			return "", fmt.Errorf("unexpected empty indexKeys")
  		}
  		return indexKeys[0], nil
  	}
  }
docs: // IndexFuncToKeyFuncAdapter adapts an indexFunc to a keyFunc.  This is only useful if your index function returns
  // unique values for every object.  This is conversion can create errors when more than one key is found.  You
  // should prefer to make proper key and index functions.