MCPcopy Create free account
hub / github.com/dbProjectRED/redimo.go / zGetWeight

Function zGetWeight

sorted_sets.go:501–511  ·  view source on GitHub ↗
(weights map[string]float64, key string)

Source from the content-addressed store, hash-verified

499}
500
501func 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}
512func (c Client) ZUNION(sourceKeys []string, aggregation ZAggregation, weights map[string]float64) (membersWithScores map[string]float64, err error) {
513 membersWithScores = make(map[string]float64)
514

Callers 2

ZUNIONMethod · 0.85
ZINTERMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected