package redisx import "context" // 列表封装 func LLen(ctx context.Context, key string) (int64, error) { return getClient().LLen(ctx, key).Result() } func LRange(ctx context.Context, key string, start, stop int64) ([]string, error) { return getClient().LRange(ctx, key, start, stop).Result() } 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() } func LTrim(ctx context.Context, key string, start, stop int64) error { return getClient().LTrim(ctx, key, start, stop).Err() }