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) {

View File

@@ -28,7 +28,6 @@
// }
// fmt.Println(str)
//
// more docs http://beego.vip/docs/module/httplib.md
package httplib
import (

View File

@@ -19,7 +19,6 @@ import (
"context"
"errors"
"fmt"
"github.com/stretchr/testify/require"
"io/ioutil"
"net"
"net/http"
@@ -29,6 +28,7 @@ import (
"time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestResponse(t *testing.T) {

View File

@@ -151,9 +151,3 @@ like this:
note: not recommend use this in product env.
## Docs
more details and examples in docs and test
[documents](http://beego.vip/docs/mvc/model/overview.md)

View File

@@ -78,7 +78,7 @@ func (builder *FilterChainBuilder) buildSpan(ctx context.Context, span otelTrace
span.SetAttributes(attribute.String("component", "beego"))
if builder.customSpanFunc != nil {
builder.customSpanFunc(ctx,span, inv)
builder.customSpanFunc(ctx, span, inv)
}
}

View File

@@ -51,7 +51,6 @@
// num, err = o.Delete(&u)
// }
//
// more docs: http://beego.vip/docs/mvc/model/overview.md
package orm
import (