Browse Source

删除无用方法

master
guzeng 1 year ago
parent
commit
74a4aeef10
3 changed files with 9 additions and 14 deletions
  1. +0
    -9
      exists.go
  2. +2
    -5
      exists_test.go
  3. +7
    -0
      hash_test.go

+ 0
- 9
exists.go View File

@ -12,12 +12,3 @@ func Exist(key string) (bool, error) {
return redisdb.Bool(c.Do("EXISTS", key))
}
//hexists
func HExist(key string) (bool, error) {
c := GetConn()
defer c.Close()
return redisdb.Bool(c.Do("HEXISTS", key))
}

+ 2
- 5
exists_test.go View File

@ -8,13 +8,10 @@ import (
func Test_Exists(t *testing.T) {
RedisInit("10.62.29.23:6379", "123456")
RedisInit("127.0.0.1:6379", "123456")
ret3, err := Exists("testing23")
ret3, err := Exists("60007_product2")
t.Log(ret3)
t.Log(err)
ret4, err := HExists("testing23", "cc")
t.Log(ret4)
t.Log(err)
}

+ 7
- 0
hash_test.go View File

@ -32,3 +32,10 @@ func Test_HMGet(t *testing.T) {
t.Log(err)
}
func Test_HGetAll(t *testing.T) {
RedisPassword = "123456"
ret3, err := HGetAll("60007_user")
t.Log(ret3)
t.Log(err)
}

Loading…
Cancel
Save