MCPcopy Create free account
hub / github.com/devfeel/dotweb / DECR

Method DECR

framework/redis/redisutil.go:143–147  ·  view source on GitHub ↗

DECR atomically decrement the value by 1 specified by key

(key string)

Source from the content-addressed store, hash-verified

141
142// DECR atomically decrement the value by 1 specified by key
143func (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.
150func (rc *RedisClient) Append(key string, val interface{}) (interface{}, error) {

Callers 2

DecrMethod · 0.80
TestRedisClient_DECRFunction · 0.80

Calls 1

DecrMethod · 0.65

Tested by 1

TestRedisClient_DECRFunction · 0.64