func (r *redis) Exists(ctx context.Context, key string) (bool, error) {
	result, err := r.client.Exists(ctx, key).Result()
	return result == 1, err
}
Exists check a key is exists
package redis
import (
	"context"
	gredis "github.com/go-redis/redis/v8"
	"time"
)
func IsError(err error) bool {
	return err != nil && err != gredis.Nil
}
func IsNil(err error) bool {
	return err == gredis.Nil
}
func (r *redis) Del(ctx context.Context, key string) (bool, error) {
	result, err := r.client.Del(ctx, key).Result()
	return result == 1, err
}