func KeysPerDomains(endpoints []Endpoint) map[string][]string {
	keysPerDomains := make(map[string][]string)

	for _, ep := range endpoints {
		domain := removePathIfPresent(ep.Endpoint)
		keysPerDomains[domain] = append(keysPerDomains[domain], ep.APIKey)
	}

	return keysPerDomains
}
// KeysPerDomains turns a list of endpoints into a map of URL -> []APIKey
KeysPerDomains turns a list of endpoints into a map of URL -> []APIKey
// KeysPerDomains turns a list of endpoints into a map of URL - > [] APIKey
func KeysPerDomains(endpoints []Endpoint) map[string][]string {
	keysPerDomains := make(map[string][]string)
	for _, ep := range endpoints {
		domain := removePathIfPresent(ep.Endpoint)
		keysPerDomains[domain] = append(keysPerDomains[domain], ep.APIKey)
	}
	return keysPerDomains
}
func KeysPerDomains ( endpoints [ ] Endpoint ) map [ string ] [ ] string { keysPerDomains := make ( map [ string ] [ ] string ) for _ , ep := range endpoints { domain := removePathIfPresent ( ep . Endpoint ) keysPerDomains [ domain ] = append ( keysPerDomains [ domain ] , ep . APIKey ) } return keysPerDomains }
KeysPerDomains turns a list of endpoints into a map of URL -> []APIKey
KeysPerDomains turns a list of endpoints into a map of URL - > [] APIKey