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

@@ -71,8 +71,8 @@ func (rc *Cache) GetMulti(ctx context.Context, keys []string) ([]interface{}, er
mv, err := rc.conn.GetMulti(keys)
if err != nil {
return rv, berror.Wrapf(err, cache.MemCacheCurdFailed,
"could not read multiple key-values from memcache, " +
"please check your keys, network and connection. Root cause: %s",
"could not read multiple key-values from memcache, "+
"please check your keys, network and connection. Root cause: %s",
err.Error())
}

View File

@@ -74,7 +74,7 @@ func TestMemcacheCache(t *testing.T) {
res, _ = bm.IsExist(context.Background(), "astaxie")
assert.False(t, res)
assert.Nil(t,bm.Put(context.Background(), "astaxie", "author", timeoutDuration) )
assert.Nil(t, bm.Put(context.Background(), "astaxie", "author", timeoutDuration))
// test string
res, _ = bm.IsExist(context.Background(), "astaxie")
assert.True(t, res)
@@ -86,7 +86,6 @@ func TestMemcacheCache(t *testing.T) {
// test GetMulti
assert.Nil(t, bm.Put(context.Background(), "astaxie1", "author1", timeoutDuration))
res, _ = bm.IsExist(context.Background(), "astaxie1")
assert.True(t, res)