From 4f5c30e083afcab437658b0c210e286defbd0870 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Wed, 10 Nov 2021 21:45:42 +0800 Subject: [PATCH] chore: remove unused const (#1224) --- core/stores/redis/redis_test.go | 2 +- core/stores/redis/redislock.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/stores/redis/redis_test.go b/core/stores/redis/redis_test.go index ae10b7d8..1e9251e1 100644 --- a/core/stores/redis/redis_test.go +++ b/core/stores/redis/redis_test.go @@ -3,7 +3,6 @@ package redis import ( "crypto/tls" "errors" - "github.com/tal-tech/go-zero/core/stringx" "io" "strconv" "testing" @@ -12,6 +11,7 @@ import ( "github.com/alicebob/miniredis/v2" red "github.com/go-redis/redis" "github.com/stretchr/testify/assert" + "github.com/tal-tech/go-zero/core/stringx" ) func TestRedis_Exists(t *testing.T) { diff --git a/core/stores/redis/redislock.go b/core/stores/redis/redislock.go index df962c06..7440d6dd 100644 --- a/core/stores/redis/redislock.go +++ b/core/stores/redis/redislock.go @@ -1,7 +1,6 @@ package redis import ( - "github.com/tal-tech/go-zero/core/stringx" "math/rand" "strconv" "sync/atomic" @@ -9,10 +8,10 @@ import ( red "github.com/go-redis/redis" "github.com/tal-tech/go-zero/core/logx" + "github.com/tal-tech/go-zero/core/stringx" ) const ( - letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" lockCommand = `if redis.call("GET", KEYS[1]) == ARGV[1] then redis.call("SET", KEYS[1], ARGV[1], "PX", ARGV[2]) return "OK"