update big、go
continuous-integration/drone/push Build is passing Details

master
李光春 2 years ago
parent 013fa3fdbc
commit d307ce5402

@ -1,26 +0,0 @@
package gocache
import (
"testing"
"time"
)
func TestBigCache(t *testing.T) {
// 实例
newBig := NewBig(time.Minute * 30)
// 结构体
type name struct {
Test string `json:"test"`
}
// 缓存组件
newBigCache := newBig.NewCache()
newBigCache.GetterInterface = func() interface{} {
return name{"测试Big插入数据3"}
}
key3 := newBigCache.GetInterface("key3")
t.Logf("key3%+v", key3)
}

@ -7,7 +7,6 @@ import (
func TestBig(t *testing.T) {
// 实例
newBig := NewBig(time.Minute * 30)
// 字符串
@ -23,4 +22,12 @@ func TestBig(t *testing.T) {
key2, _ := newBig.Get("key2")
t.Logf("key2%+v", key2)
// 缓存组件
newBigCache := newBig.NewCache()
newBigCache.GetterInterface = func() interface{} {
return name{"测试Big插入数据3"}
}
key3 := newBigCache.GetInterface("key3")
t.Logf("key3%+v", key3)
}

@ -1,25 +0,0 @@
package gocache
import (
"testing"
"time"
)
func TestGoCache(t *testing.T) {
// 实例
newGo := NewGo(5*time.Minute, 10*time.Minute)
// 结构体
type name struct {
Test string `json:"test"`
}
// 缓存组件
bigCache := newGo.NewCache(5 * time.Minute)
bigCache.GetterInterface = func() interface{} {
return name{"测试Go插入数据3"}
}
key3 := bigCache.GetInterface("key3")
t.Logf("key3%+v", key3)
}

@ -7,7 +7,6 @@ import (
func TestGo(t *testing.T) {
// 实例
newGo := NewGo(5*time.Minute, 10*time.Minute)
// 字符串
@ -23,4 +22,12 @@ func TestGo(t *testing.T) {
key2, _ := newGo.Get("key2")
t.Logf("key2%+v", key2)
// 缓存组件
bigCache := newGo.NewCache(5 * time.Minute)
bigCache.GetterInterface = func() interface{} {
return name{"测试Go插入数据3"}
}
key3 := bigCache.GetInterface("key3")
t.Logf("key3%+v", key3)
}

Loading…
Cancel
Save