(weights map[string]float64, key string)
| 499 | } |
| 500 | |
| 501 | func zGetWeight(weights map[string]float64, key string) float64 { |
| 502 | if weights == nil { |
| 503 | return 1 |
| 504 | } |
| 505 | |
| 506 | if w, ok := weights[key]; ok { |
| 507 | return w |
| 508 | } |
| 509 | |
| 510 | return 1 |
| 511 | } |
| 512 | func (c Client) ZUNION(sourceKeys []string, aggregation ZAggregation, weights map[string]float64) (membersWithScores map[string]float64, err error) { |
| 513 | membersWithScores = make(map[string]float64) |
| 514 |