code: func RepoNameForReference(ref reference.Named) (string, error) {
  	// insecure is fine since this only returns the name
  	repo, err := newDefaultRepositoryEndpoint(ref, false)
  	if err != nil {
  		return "", err
  	}
  	return repo.Name(), nil
  }
docs: // RepoNameForReference returns the repository name from a reference