code: func getEndpointsAndPort(endpoints []string) (endpointsR []string, portR int, err error) {
  	var resultEndpoints []string
  	var resultPort int
  
  	if len(endpoints) > 1 {
  		return nil, 0, ErrInvalidEndpointConfig
  	}
  
  	if len(endpoints[0]) > 0 {
  		v := endpoints[0]
  
  		if !strings.Contains(v, ":") {
  			return nil, 0, ErrInvalidEndpointConfig
  		}
  
  		if strings.Contains(v, ",") {
  			endpointsAndPort := strings.Split(v, ",")
  			for _, val := range endpointsAndPort {
  				endpointAndPort := strings.Split(val, ":")
  				resultEndpoints = append(resultEndpoints, endpointAndPort[0])
  				resultPort, err = strconv.Atoi(endpointAndPort[1])
  				if err != nil {
  					return nil, 0, err
  				}
  			}
  
  		} else {
  			endpointAndPort := strings.Split(v, ":")
  			resultEndpoints = append(resultEndpoints, endpointAndPort[0])
  			resultPort, err = strconv.Atoi(endpointAndPort[1])
  			if err != nil {
  				return nil, 0, err
  			}
  		}
  	} else {
  		return nil, 0, ErrInvalidEndpointConfig
  	}
  
  	return resultEndpoints, resultPort, nil
  }
docs: //getEndpointsAndPort does string manipulation to extract []endpoints and port eg: "127.0.0.1:9042" or "127.0.0.1:9042,127.0.0.2:9042"