Chore: format code

This commit is contained in:
loyalsoldier
2021-05-18 23:16:04 +08:00
parent 8f9eccefe9
commit 2b7401109f
33 changed files with 51 additions and 76 deletions

View File

@@ -24,10 +24,10 @@ import (
)
const (
initError = "init err"
setError = "set Error"
checkError = "check err"
getError = "get err"
initError = "init err"
setError = "set Error"
checkError = "check err"
getError = "get err"
getMultiError = "GetMulti Error"
)
@@ -100,7 +100,6 @@ func TestCache(t *testing.T) {
assert.Equal(t, 2, len(vv))
assert.Equal(t, "author", vv[0])
assert.Equal(t, "author1", vv[1])

View File

@@ -27,10 +27,10 @@ import (
)
const (
initError = "init err"
setError = "set Error"
checkError = "check err"
getError = "get err"
initError = "init err"
setError = "set Error"
checkError = "check err"
getError = "get err"
getMultiError = "GetMulti Error"
)
@@ -72,7 +72,7 @@ func TestMemcacheCache(t *testing.T) {
assert.Nil(t, bm.Delete("astaxie"))
assert.False(t, bm.IsExist("astaxie"))
assert.False(t, bm.IsExist("astaxie"))
assert.Nil(t, bm.Put("astaxie", "author", timeoutDuration))

View File

@@ -27,10 +27,10 @@ import (
)
const (
initError = "init err"
setError = "set Error"
checkError = "check err"
getError = "get err"
initError = "init err"
setError = "set Error"
checkError = "check err"
getError = "get err"
getMultiError = "GetMulti Error"
)
@@ -52,7 +52,7 @@ func TestRedisCache(t *testing.T) {
assert.False(t, bm.IsExist("astaxie"))
assert.Nil(t, bm.Put("astaxie", 1, timeoutDuration))
assert.Nil(t, bm.Put("astaxie", 1, timeoutDuration))
v, err := redis.Int(bm.Get("astaxie"), err)
assert.Nil(t, err)

View File

@@ -13,10 +13,10 @@ import (
)
const (
initError = "init err"
setError = "set Error"
checkError = "check err"
getError = "get err"
initError = "init err"
setError = "set Error"
checkError = "check err"
getError = "get err"
getMultiError = "GetMulti Error"
)
@@ -70,7 +70,7 @@ func TestSsdbcacheCache(t *testing.T) {
// test GetMulti done
assert.Nil(t, ssdb.Put("ssdb1", "ssdb1", -10*time.Second))
assert.True(t, ssdb.IsExist("ssdb1") )
assert.True(t, ssdb.IsExist("ssdb1"))
vv := ssdb.GetMulti([]string{"ssdb", "ssdb1"})
assert.Equal(t, 2, len(vv))