mirror of
https://github.com/astaxie/beego.git
synced 2025-06-11 12:20:40 +00:00
uing pkg module
This commit is contained in:
3
pkg/cache/memcache/memcache.go
vendored
3
pkg/cache/memcache/memcache.go
vendored
@ -35,8 +35,9 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/cache"
|
||||
"github.com/bradfitz/gomemcache/memcache"
|
||||
|
||||
"github.com/astaxie/beego/pkg/cache"
|
||||
)
|
||||
|
||||
// Cache Memcache adapter.
|
||||
|
6
pkg/cache/memcache/memcache_test.go
vendored
6
pkg/cache/memcache/memcache_test.go
vendored
@ -21,7 +21,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/cache"
|
||||
"github.com/astaxie/beego/pkg/cache"
|
||||
)
|
||||
|
||||
func TestMemcacheCache(t *testing.T) {
|
||||
@ -70,7 +70,7 @@ func TestMemcacheCache(t *testing.T) {
|
||||
t.Error("delete err")
|
||||
}
|
||||
|
||||
//test string
|
||||
// test string
|
||||
if err = bm.Put("astaxie", "author", timeoutDuration); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
@ -82,7 +82,7 @@ func TestMemcacheCache(t *testing.T) {
|
||||
t.Error("get err")
|
||||
}
|
||||
|
||||
//test GetMulti
|
||||
// test GetMulti
|
||||
if err = bm.Put("astaxie1", "author1", timeoutDuration); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
|
6
pkg/cache/redis/redis.go
vendored
6
pkg/cache/redis/redis.go
vendored
@ -34,12 +34,12 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gomodule/redigo/redis"
|
||||
|
||||
"github.com/astaxie/beego/cache"
|
||||
"strings"
|
||||
"github.com/astaxie/beego/pkg/cache"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -56,7 +56,7 @@ type Cache struct {
|
||||
password string
|
||||
maxIdle int
|
||||
|
||||
//the timeout to a value less than the redis server's timeout.
|
||||
// the timeout to a value less than the redis server's timeout.
|
||||
timeout time.Duration
|
||||
}
|
||||
|
||||
|
7
pkg/cache/redis/redis_test.go
vendored
7
pkg/cache/redis/redis_test.go
vendored
@ -19,9 +19,10 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/cache"
|
||||
"github.com/gomodule/redigo/redis"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/astaxie/beego/pkg/cache"
|
||||
)
|
||||
|
||||
func TestRedisCache(t *testing.T) {
|
||||
@ -70,7 +71,7 @@ func TestRedisCache(t *testing.T) {
|
||||
t.Error("delete err")
|
||||
}
|
||||
|
||||
//test string
|
||||
// test string
|
||||
if err = bm.Put("astaxie", "author", timeoutDuration); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
@ -82,7 +83,7 @@ func TestRedisCache(t *testing.T) {
|
||||
t.Error("get err")
|
||||
}
|
||||
|
||||
//test GetMulti
|
||||
// test GetMulti
|
||||
if err = bm.Put("astaxie1", "author1", timeoutDuration); err != nil {
|
||||
t.Error("set Error", err)
|
||||
}
|
||||
|
2
pkg/cache/ssdb/ssdb.go
vendored
2
pkg/cache/ssdb/ssdb.go
vendored
@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/ssdb/gossdb/ssdb"
|
||||
|
||||
"github.com/astaxie/beego/cache"
|
||||
"github.com/astaxie/beego/pkg/cache"
|
||||
)
|
||||
|
||||
// Cache SSDB adapter
|
||||
|
2
pkg/cache/ssdb/ssdb_test.go
vendored
2
pkg/cache/ssdb/ssdb_test.go
vendored
@ -5,7 +5,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/cache"
|
||||
"github.com/astaxie/beego/pkg/cache"
|
||||
)
|
||||
|
||||
func TestSsdbcacheCache(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user