DECR atomically decrement the value by 1 specified by key
(key string)
| 141 | |
| 142 | // DECR atomically decrement the value by 1 specified by key |
| 143 | func (rc *RedisClient) DECR(key string) (int, error) { |
| 144 | ctx := context.Background() |
| 145 | val, err := rc.client.Decr(ctx, key).Result() |
| 146 | return int(val), err |
| 147 | } |
| 148 | |
| 149 | // Append appends the string to original value specified by key. |
| 150 | func (rc *RedisClient) Append(key string, val interface{}) (interface{}, error) { |