code: func newRepositoryInfo(config *serviceConfig, name reference.Named) (*RepositoryInfo, error) {
  	index, err := newIndexInfo(config, reference.Domain(name))
  	if err != nil {
  		return nil, err
  	}
  	official := !strings.ContainsRune(reference.FamiliarName(name), '/')
  
  	return &RepositoryInfo{
  		Name:     reference.TrimNamed(name),
  		Index:    index,
  		Official: official,
  	}, nil
  }
docs: // newRepositoryInfo validates and breaks down a repository name into a RepositoryInfo