feat: rename module from tal-tech to zeromicro (#1413)

This commit is contained in:
Kevin Wan
2022-01-04 15:51:32 +08:00
committed by GitHub
parent e267d94ee1
commit a91c3907a8
277 changed files with 578 additions and 578 deletions

View File

@@ -5,9 +5,9 @@ import (
"log"
"time"
"github.com/tal-tech/go-zero/core/errorx"
"github.com/tal-tech/go-zero/core/hash"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/errorx"
"github.com/zeromicro/go-zero/core/hash"
"github.com/zeromicro/go-zero/core/syncx"
)
type (

View File

@@ -9,11 +9,11 @@ import (
"time"
"github.com/stretchr/testify/assert"
"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/redis/redistest"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/errorx"
"github.com/zeromicro/go-zero/core/hash"
"github.com/zeromicro/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/stores/redis/redistest"
"github.com/zeromicro/go-zero/core/syncx"
)
type mockedNode struct {

View File

@@ -7,12 +7,12 @@ import (
"sync"
"time"
"github.com/tal-tech/go-zero/core/jsonx"
"github.com/tal-tech/go-zero/core/logx"
"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/syncx"
"github.com/zeromicro/go-zero/core/jsonx"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/mathx"
"github.com/zeromicro/go-zero/core/stat"
"github.com/zeromicro/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/syncx"
)
const (

View File

@@ -11,12 +11,12 @@ import (
"github.com/alicebob/miniredis/v2"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/logx"
"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/redis/redistest"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/mathx"
"github.com/zeromicro/go-zero/core/stat"
"github.com/zeromicro/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/stores/redis/redistest"
"github.com/zeromicro/go-zero/core/syncx"
)
var errTestNotFound = errors.New("not found")

View File

@@ -4,7 +4,7 @@ import (
"sync/atomic"
"time"
"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/logx"
)
const statInterval = time.Minute

View File

@@ -4,12 +4,12 @@ import (
"fmt"
"time"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/proc"
"github.com/tal-tech/go-zero/core/stat"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/core/threading"
"github.com/zeromicro/go-zero/core/collection"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/proc"
"github.com/zeromicro/go-zero/core/stat"
"github.com/zeromicro/go-zero/core/stringx"
"github.com/zeromicro/go-zero/core/threading"
)
const (

View File

@@ -1,6 +1,6 @@
package cache
import "github.com/tal-tech/go-zero/core/stores/redis"
import "github.com/zeromicro/go-zero/core/stores/redis"
type (
// A ClusterConf is the config of a redis cluster that used as cache.

View File

@@ -3,7 +3,7 @@ package clickhouse
import (
// imports the driver, don't remove this comment, golint requires.
_ "github.com/ClickHouse/clickhouse-go"
"github.com/tal-tech/go-zero/core/stores/sqlx"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)
const clickHouseDriverName = "clickhouse"

View File

@@ -1,6 +1,6 @@
package kv
import "github.com/tal-tech/go-zero/core/stores/cache"
import "github.com/zeromicro/go-zero/core/stores/cache"
// KvConf is an alias of cache.ClusterConf.
type KvConf = cache.ClusterConf

View File

@@ -4,10 +4,10 @@ import (
"errors"
"log"
"github.com/tal-tech/go-zero/core/errorx"
"github.com/tal-tech/go-zero/core/hash"
"github.com/tal-tech/go-zero/core/stores/cache"
"github.com/tal-tech/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/errorx"
"github.com/zeromicro/go-zero/core/hash"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/redis"
)
// ErrNoRedisNode is an error that indicates no redis node.

View File

@@ -6,10 +6,10 @@ import (
"github.com/alicebob/miniredis/v2"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/hash"
"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/stringx"
"github.com/zeromicro/go-zero/core/hash"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/stringx"
)
var (

View File

@@ -4,8 +4,8 @@ import (
"time"
"github.com/globalsign/mgo"
"github.com/tal-tech/go-zero/core/executors"
"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/executors"
"github.com/zeromicro/go-zero/core/logx"
)
const (

View File

@@ -5,10 +5,10 @@ import (
"time"
"github.com/globalsign/mgo"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stores/mongo/internal"
"github.com/tal-tech/go-zero/core/timex"
"github.com/zeromicro/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/stores/mongo/internal"
"github.com/zeromicro/go-zero/core/timex"
)
const defaultSlowThreshold = time.Millisecond * 500

View File

@@ -7,10 +7,10 @@ import (
"github.com/globalsign/mgo"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stores/mongo/internal"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/zeromicro/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/stores/mongo/internal"
"github.com/zeromicro/go-zero/core/stringx"
)
var errDummy = errors.New("dummy")

View File

@@ -4,7 +4,7 @@ package mongo
import (
"github.com/globalsign/mgo/bson"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/breaker"
)
type (

View File

@@ -7,9 +7,9 @@ import (
"github.com/globalsign/mgo"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/stringx"
"github.com/zeromicro/go-zero/core/syncx"
)
func TestClosableIter_Close(t *testing.T) {

View File

@@ -5,7 +5,7 @@ import (
"time"
"github.com/globalsign/mgo"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/breaker"
)
// A Model is a mongo model.

View File

@@ -3,7 +3,7 @@ package mongo
import (
"time"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/syncx"
)
var slowThreshold = syncx.ForAtomicDuration(defaultSlowThreshold)

View File

@@ -4,7 +4,7 @@ import (
"time"
"github.com/globalsign/mgo"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/breaker"
)
type (

View File

@@ -4,7 +4,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/breaker"
)
func TestRejectedPipe_All(t *testing.T) {

View File

@@ -4,7 +4,7 @@ import (
"time"
"github.com/globalsign/mgo"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/breaker"
)
type (

View File

@@ -5,7 +5,7 @@ import (
"github.com/globalsign/mgo"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/breaker"
)
func Test_rejectedQuery_All(t *testing.T) {

View File

@@ -5,8 +5,8 @@ import (
"time"
"github.com/globalsign/mgo"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/syncx"
)
const (

View File

@@ -2,9 +2,9 @@ package mongoc
import (
"github.com/globalsign/mgo"
"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/syncx"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/mongo"
"github.com/zeromicro/go-zero/core/syncx"
)
var (

View File

@@ -15,11 +15,11 @@ import (
"github.com/globalsign/mgo"
"github.com/globalsign/mgo/bson"
"github.com/stretchr/testify/assert"
"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/mongo"
"github.com/tal-tech/go-zero/core/stores/redis"
"github.com/tal-tech/go-zero/core/stores/redis/redistest"
"github.com/zeromicro/go-zero/core/stat"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/mongo"
"github.com/zeromicro/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/stores/redis/redistest"
)
const dummyCount = 10

View File

@@ -4,9 +4,9 @@ import (
"log"
"github.com/globalsign/mgo"
"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/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/mongo"
"github.com/zeromicro/go-zero/core/stores/redis"
)
// A Model is a mongo model that built with cache capability.

View File

@@ -3,7 +3,7 @@ package postgres
import (
// imports the driver, don't remove this comment, golint requires.
_ "github.com/lib/pq"
"github.com/tal-tech/go-zero/core/stores/sqlx"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)
const postgresDriverName = "postgres"

View File

@@ -4,7 +4,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/zeromicro/go-zero/core/stringx"
)
func TestRedisConf(t *testing.T) {

View File

@@ -4,9 +4,9 @@ import (
"strings"
red "github.com/go-redis/redis"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/mapping"
"github.com/tal-tech/go-zero/core/timex"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/mapping"
"github.com/zeromicro/go-zero/core/timex"
)
func checkDuration(proc func(red.Cmder) error) func(red.Cmder) error {

View File

@@ -7,9 +7,9 @@ import (
"time"
red "github.com/go-redis/redis"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/tal-tech/go-zero/core/mapping"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/mapping"
"github.com/zeromicro/go-zero/core/syncx"
)
const (

View File

@@ -11,7 +11,7 @@ import (
"github.com/alicebob/miniredis/v2"
red "github.com/go-redis/redis"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/zeromicro/go-zero/core/stringx"
)
func TestRedis_Decr(t *testing.T) {

View File

@@ -4,7 +4,7 @@ import (
"fmt"
red "github.com/go-redis/redis"
"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/logx"
)
// ClosableNode interface represents a closable redis node.

View File

@@ -5,7 +5,7 @@ import (
"io"
red "github.com/go-redis/redis"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/syncx"
)
const (

View File

@@ -5,7 +5,7 @@ import (
"io"
red "github.com/go-redis/redis"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/syncx"
)
var clusterManager = syncx.NewResourceManager()

View File

@@ -6,8 +6,8 @@ import (
"time"
red "github.com/go-redis/redis"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/stringx"
)
const (

View File

@@ -4,7 +4,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/zeromicro/go-zero/core/stringx"
)
func TestRedisLock(t *testing.T) {

View File

@@ -4,8 +4,8 @@ import (
"time"
"github.com/alicebob/miniredis/v2"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/lang"
"github.com/zeromicro/go-zero/core/stores/redis"
)
// CreateRedis returns a in process redis.Redis.

View File

@@ -4,10 +4,10 @@ import (
"database/sql"
"time"
"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/sqlx"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"github.com/zeromicro/go-zero/core/syncx"
)
// see doc/sql-cache.md

View File

@@ -16,13 +16,13 @@ import (
"github.com/alicebob/miniredis/v2"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/fx"
"github.com/tal-tech/go-zero/core/logx"
"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/redis/redistest"
"github.com/tal-tech/go-zero/core/stores/sqlx"
"github.com/zeromicro/go-zero/core/fx"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/stat"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/redis"
"github.com/zeromicro/go-zero/core/stores/redis/redistest"
"github.com/zeromicro/go-zero/core/stores/sqlx"
)
func init() {

View File

@@ -6,9 +6,9 @@ import (
"strings"
"time"
"github.com/tal-tech/go-zero/core/executors"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/zeromicro/go-zero/core/executors"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/stringx"
)
const (

View File

@@ -8,7 +8,7 @@ import (
"github.com/DATA-DOG/go-sqlmock"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/logx"
)
type mockedConn struct {

View File

@@ -7,9 +7,9 @@ import (
"github.com/go-sql-driver/mysql"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stat"
"github.com/zeromicro/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/stat"
)
func init() {

View File

@@ -5,7 +5,7 @@ import (
"reflect"
"strings"
"github.com/tal-tech/go-zero/core/mapping"
"github.com/zeromicro/go-zero/core/mapping"
)
const tagName = "db"

View File

@@ -7,7 +7,7 @@ import (
"github.com/DATA-DOG/go-sqlmock"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/logx"
)
func TestUnmarshalRowBool(t *testing.T) {

View File

@@ -3,8 +3,8 @@ package sqlx
import (
"database/sql"
"github.com/tal-tech/go-zero/core/breaker"
"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/breaker"
"github.com/zeromicro/go-zero/core/logx"
)
// ErrNotFound is an alias of sql.ErrNoRows

View File

@@ -7,7 +7,7 @@ import (
"github.com/DATA-DOG/go-sqlmock"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/logx"
)
const mockedDatasource = "sqlmock"

View File

@@ -6,7 +6,7 @@ import (
"sync"
"time"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/syncx"
)
const (

View File

@@ -4,9 +4,9 @@ import (
"database/sql"
"time"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/timex"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/syncx"
"github.com/zeromicro/go-zero/core/timex"
)
const defaultSlowThreshold = time.Millisecond * 500

View File

@@ -5,8 +5,8 @@ import (
"strconv"
"strings"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/mapping"
"github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/core/mapping"
)
func desensitize(datasource string) string {