format code

This commit is contained in:
Deng Ming
2022-12-23 10:25:06 +08:00
parent 15fa7e15d4
commit 5ade9fa025
64 changed files with 35 additions and 109 deletions

View File

@@ -28,7 +28,6 @@
// bm.IsExist("astaxie")
// bm.Delete("astaxie")
//
// more docs http://beego.vip/docs/module/cache.md
package cache
import (

View File

@@ -26,7 +26,6 @@
//
// bm, err := cache.NewCache("memcache", `{"conn":"127.0.0.1:11211"}`)
//
// more docs http://beego.vip/docs/module/cache.md
package memcache
import (

View File

@@ -24,12 +24,11 @@ import (
"testing"
"time"
"github.com/beego/beego/v2/core/berror"
_ "github.com/bradfitz/gomemcache/memcache"
"github.com/stretchr/testify/assert"
"github.com/beego/beego/v2/client/cache"
"github.com/beego/beego/v2/core/berror"
)
func TestMemcacheCache(t *testing.T) {

View File

@@ -20,8 +20,9 @@ import (
"testing"
"time"
"github.com/beego/beego/v2/core/berror"
"github.com/stretchr/testify/assert"
"github.com/beego/beego/v2/core/berror"
)
func TestReadThroughCache_Memory_Get(t *testing.T) {

View File

@@ -26,7 +26,6 @@
//
// bm, err := cache.NewCache("redis", `{"conn":"127.0.0.1:11211"}`)
//
// more docs http://beego.vip/docs/module/cache.md
package redis
import (

View File

@@ -22,12 +22,11 @@ import (
"testing"
"time"
"github.com/beego/beego/v2/core/berror"
"github.com/gomodule/redigo/redis"
"github.com/stretchr/testify/assert"
"github.com/beego/beego/v2/client/cache"
"github.com/beego/beego/v2/core/berror"
)
func TestRedisCache(t *testing.T) {

View File

@@ -18,8 +18,9 @@ import (
"context"
"time"
"github.com/beego/beego/v2/core/berror"
"golang.org/x/sync/singleflight"
"github.com/beego/beego/v2/core/berror"
)
// SingleflightCache

View File

@@ -10,11 +10,10 @@ import (
"testing"
"time"
"github.com/beego/beego/v2/core/berror"
"github.com/stretchr/testify/assert"
"github.com/beego/beego/v2/client/cache"
"github.com/beego/beego/v2/core/berror"
)
func TestSsdbcacheCache(t *testing.T) {

View File

@@ -22,8 +22,9 @@ import (
"testing"
"time"
"github.com/beego/beego/v2/core/berror"
"github.com/stretchr/testify/assert"
"github.com/beego/beego/v2/core/berror"
)
func TestWriteThoughCache_Set(t *testing.T) {