You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
220 B

package redishandle
import "context"
func (c *RedisClient) ListSize(ctx context.Context, key string) (int64, error) {
l, err := c.Client.LLen(ctx, key).Result()
if err != nil {
return -1, err
}
return l, nil
}