code: func mapAddressesByPort(subset *api.EndpointSubset, port api.EndpointPort, allAddrs map[addressKey]*api.EndpointAddress, portToAddrReadyMap map[api.EndpointPort]addressSet) {
  	for k := range subset.Addresses {
  		mapAddressByPort(&subset.Addresses[k], port, true, allAddrs, portToAddrReadyMap)
  	}
  	for k := range subset.NotReadyAddresses {
  		mapAddressByPort(&subset.NotReadyAddresses[k], port, false, allAddrs, portToAddrReadyMap)
  	}
  }
docs: // mapAddressesByPort adds all ready and not-ready addresses into a map by a single port.