ZAdd adds a value with its given score and member to a sorted set (ZSet), associated with the provided key. It is a method on the ZSetStructure type. Parameters: key: a string that represents the key of the sorted set. score: an integer value that determines the order of the added element in
(key string, score int, member string, value string)
| 484 | // |
| 485 | // If the key is an empty string, an error will be returned |
| 486 | func (zs *ZSetStructure) ZAdd(key string, score int, member string, value string) error { |
| 487 | return zs.ZAdds(key, []ZSetValue{{score: score, member: member, value: value}}...) |
| 488 | } |
| 489 | |
| 490 | // ZAdds adds a value with its given score and member to a sorted set (ZSet), associated with |
| 491 | // the provided key. It is a method on the ZSetStructure type. |