chore: remove unused const (#1224)

master
Kevin Wan 3 years ago committed by GitHub
parent 9d0b51fa26
commit 4f5c30e083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,7 +3,6 @@ package redis
import ( import (
"crypto/tls" "crypto/tls"
"errors" "errors"
"github.com/tal-tech/go-zero/core/stringx"
"io" "io"
"strconv" "strconv"
"testing" "testing"
@ -12,6 +11,7 @@ import (
"github.com/alicebob/miniredis/v2" "github.com/alicebob/miniredis/v2"
red "github.com/go-redis/redis" red "github.com/go-redis/redis"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
) )
func TestRedis_Exists(t *testing.T) { func TestRedis_Exists(t *testing.T) {

@ -1,7 +1,6 @@
package redis package redis
import ( import (
"github.com/tal-tech/go-zero/core/stringx"
"math/rand" "math/rand"
"strconv" "strconv"
"sync/atomic" "sync/atomic"
@ -9,10 +8,10 @@ import (
red "github.com/go-redis/redis" red "github.com/go-redis/redis"
"github.com/tal-tech/go-zero/core/logx" "github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stringx"
) )
const ( const (
letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
lockCommand = `if redis.call("GET", KEYS[1]) == ARGV[1] then lockCommand = `if redis.call("GET", KEYS[1]) == ARGV[1] then
redis.call("SET", KEYS[1], ARGV[1], "PX", ARGV[2]) redis.call("SET", KEYS[1], ARGV[1], "PX", ARGV[2])
return "OK" return "OK"

Loading…
Cancel
Save