code: func splitDockerDomain(name string) (domain, remainder string) {
  	i := strings.IndexRune(name, '/')
  	if i == -1 || (!strings.ContainsAny(name[:i], ".:") && name[:i] != "localhost") {
  		domain, remainder = defaultDomain, name
  	} else {
  		domain, remainder = name[:i], name[i+1:]
  	}
  	if domain == legacyDefaultDomain {
  		domain = defaultDomain
  	}
  	if domain == defaultDomain && !strings.ContainsRune(remainder, '/') {
  		remainder = officialRepoName + "/" + remainder
  	}
  	return
  }
docs: // splitDockerDomain splits a repository name to domain and remotename string.
  // If no valid domain is found, the default domain is used. Repository name
  // needs to be already validated before.