| 1234567891011121314151617 |
- package redisx
- import "context"
- // 列表封装
- func LPush(ctx context.Context, key string, values ...interface{}) error {
- return getClient().LPush(ctx, key, values...).Err()
- }
- func RPush(ctx context.Context, key string, values ...interface{}) error {
- return getClient().RPush(ctx, key, values...).Err()
- }
- func LPop(ctx context.Context, key string) (string, error) {
- return getClient().LPop(ctx, key).Result()
- }
|