From d0b76b1d9a8637ab391c119b95770ab9f1eec6f3 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 3 Nov 2020 16:35:34 +0800 Subject: [PATCH] move redistest into redis package --- core/bloom/bloom_test.go | 2 +- core/limit/periodlimit_test.go | 2 +- core/limit/tokenlimit_test.go | 2 +- core/stores/cache/cache_test.go | 2 +- core/stores/cache/cachenode_test.go | 2 +- core/stores/mongoc/cachedcollection_test.go | 2 +- core/stores/{ => redis}/redistest/redistest.go | 0 core/stores/sqlc/cachedsql_test.go | 2 +- readme.md | 4 ++-- zrpc/internal/auth/auth_test.go | 2 +- zrpc/internal/serverinterceptors/authinterceptor_test.go | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) rename core/stores/{ => redis}/redistest/redistest.go (100%) diff --git a/core/bloom/bloom_test.go b/core/bloom/bloom_test.go index 3be351ba9..acad4d6c1 100644 --- a/core/bloom/bloom_test.go +++ b/core/bloom/bloom_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/tal-tech/go-zero/core/stores/redistest" + "github.com/tal-tech/go-zero/core/stores/redis/redistest" ) func TestRedisBitSet_New_Set_Test(t *testing.T) { diff --git a/core/limit/periodlimit_test.go b/core/limit/periodlimit_test.go index 579bde19a..609f4ccc2 100644 --- a/core/limit/periodlimit_test.go +++ b/core/limit/periodlimit_test.go @@ -6,7 +6,7 @@ import ( "github.com/alicebob/miniredis" "github.com/stretchr/testify/assert" "github.com/tal-tech/go-zero/core/stores/redis" - "github.com/tal-tech/go-zero/core/stores/redistest" + "github.com/tal-tech/go-zero/core/stores/redis/redistest" ) func TestPeriodLimit_Take(t *testing.T) { diff --git a/core/limit/tokenlimit_test.go b/core/limit/tokenlimit_test.go index eae3d30d5..4c9ce0f91 100644 --- a/core/limit/tokenlimit_test.go +++ b/core/limit/tokenlimit_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/tal-tech/go-zero/core/logx" "github.com/tal-tech/go-zero/core/stores/redis" - "github.com/tal-tech/go-zero/core/stores/redistest" + "github.com/tal-tech/go-zero/core/stores/redis/redistest" ) func init() { diff --git a/core/stores/cache/cache_test.go b/core/stores/cache/cache_test.go index f67f79b1d..985cd57e6 100644 --- a/core/stores/cache/cache_test.go +++ b/core/stores/cache/cache_test.go @@ -12,7 +12,7 @@ import ( "github.com/tal-tech/go-zero/core/errorx" "github.com/tal-tech/go-zero/core/hash" "github.com/tal-tech/go-zero/core/stores/redis" - "github.com/tal-tech/go-zero/core/stores/redistest" + "github.com/tal-tech/go-zero/core/stores/redis/redistest" "github.com/tal-tech/go-zero/core/syncx" ) diff --git a/core/stores/cache/cachenode_test.go b/core/stores/cache/cachenode_test.go index 27a0b19be..d80046029 100644 --- a/core/stores/cache/cachenode_test.go +++ b/core/stores/cache/cachenode_test.go @@ -15,7 +15,7 @@ import ( "github.com/tal-tech/go-zero/core/mathx" "github.com/tal-tech/go-zero/core/stat" "github.com/tal-tech/go-zero/core/stores/redis" - "github.com/tal-tech/go-zero/core/stores/redistest" + "github.com/tal-tech/go-zero/core/stores/redis/redistest" "github.com/tal-tech/go-zero/core/syncx" ) diff --git a/core/stores/mongoc/cachedcollection_test.go b/core/stores/mongoc/cachedcollection_test.go index 95e601269..596bf5c05 100644 --- a/core/stores/mongoc/cachedcollection_test.go +++ b/core/stores/mongoc/cachedcollection_test.go @@ -18,7 +18,7 @@ import ( "github.com/tal-tech/go-zero/core/stores/cache" "github.com/tal-tech/go-zero/core/stores/mongo" "github.com/tal-tech/go-zero/core/stores/redis" - "github.com/tal-tech/go-zero/core/stores/redistest" + "github.com/tal-tech/go-zero/core/stores/redis/redistest" ) func init() { diff --git a/core/stores/redistest/redistest.go b/core/stores/redis/redistest/redistest.go similarity index 100% rename from core/stores/redistest/redistest.go rename to core/stores/redis/redistest/redistest.go diff --git a/core/stores/sqlc/cachedsql_test.go b/core/stores/sqlc/cachedsql_test.go index b53128eaa..dd1c0448b 100644 --- a/core/stores/sqlc/cachedsql_test.go +++ b/core/stores/sqlc/cachedsql_test.go @@ -20,7 +20,7 @@ import ( "github.com/tal-tech/go-zero/core/stat" "github.com/tal-tech/go-zero/core/stores/cache" "github.com/tal-tech/go-zero/core/stores/redis" - "github.com/tal-tech/go-zero/core/stores/redistest" + "github.com/tal-tech/go-zero/core/stores/redis/redistest" "github.com/tal-tech/go-zero/core/stores/sqlx" ) diff --git a/readme.md b/readme.md index f3ffcb78b..e2b4ac779 100644 --- a/readme.md +++ b/readme.md @@ -16,8 +16,6 @@ go-zero 是一个集成了各种工程实践的 web 和 rpc 框架。通过弹 go-zero 包含极简的 API 定义和生成工具 goctl,可以根据定义的 api 文件一键生成 Go, iOS, Android, Kotlin, Dart, TypeScript, JavaScript 代码,并可直接运行。 -看着觉得不错的,烦请 **Star** - 使用 go-zero 的好处: * 轻松获得支撑千万日活服务的稳定性 @@ -81,6 +79,8 @@ go-zero 是一个集成了各种工程实践的包含 web 和 rpc 框架,有 ![弹性设计](doc/images/resilience.jpg) +觉得不错的话,别忘 **star** 👏 + ## 4. Installation 在项目目录下通过如下命令安装: diff --git a/zrpc/internal/auth/auth_test.go b/zrpc/internal/auth/auth_test.go index c1f5c9b44..6cdf3b5a6 100644 --- a/zrpc/internal/auth/auth_test.go +++ b/zrpc/internal/auth/auth_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/tal-tech/go-zero/core/stores/redistest" + "github.com/tal-tech/go-zero/core/stores/redis/redistest" "google.golang.org/grpc/metadata" ) diff --git a/zrpc/internal/serverinterceptors/authinterceptor_test.go b/zrpc/internal/serverinterceptors/authinterceptor_test.go index 687b09403..975e84379 100644 --- a/zrpc/internal/serverinterceptors/authinterceptor_test.go +++ b/zrpc/internal/serverinterceptors/authinterceptor_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/tal-tech/go-zero/core/stores/redistest" + "github.com/tal-tech/go-zero/core/stores/redis/redistest" "github.com/tal-tech/go-zero/zrpc/internal/auth" "google.golang.org/grpc" "google.golang.org/grpc/metadata"