update package reference

master
kevin 4 years ago
parent d19d25c72f
commit 0a7e0cce77

@ -4,8 +4,8 @@ import (
"errors"
"strconv"
"zero/core/hash"
"zero/core/stores/redis"
"github.com/tal-tech/go-zero/core/hash"
"github.com/tal-tech/go-zero/core/stores/redis"
)
const (

@ -3,10 +3,9 @@ package bloom
import (
"testing"
"zero/core/stores/redis"
"github.com/alicebob/miniredis"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stores/redis"
)
func TestRedisBitSet_New_Set_Test(t *testing.T) {

@ -7,10 +7,10 @@ import (
"sync"
"time"
"zero/core/mathx"
"zero/core/proc"
"zero/core/stat"
"zero/core/stringx"
"github.com/tal-tech/go-zero/core/mathx"
"github.com/tal-tech/go-zero/core/proc"
"github.com/tal-tech/go-zero/core/stat"
"github.com/tal-tech/go-zero/core/stringx"
)
const (

@ -5,9 +5,8 @@ import (
"strconv"
"testing"
"zero/core/stat"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stat"
)
func init() {

@ -5,9 +5,8 @@ import (
"fmt"
"testing"
"zero/core/stat"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stat"
)
func init() {

@ -5,8 +5,8 @@ import (
"sync/atomic"
"time"
"zero/core/collection"
"zero/core/mathx"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/core/mathx"
)
const (

@ -7,11 +7,10 @@ import (
"testing"
"time"
"zero/core/collection"
"zero/core/mathx"
"zero/core/stat"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/core/mathx"
"github.com/tal-tech/go-zero/core/stat"
)
const (

@ -7,7 +7,7 @@ import (
"encoding/base64"
"errors"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
var ErrPaddingSize = errors.New("padding size error")

@ -6,9 +6,9 @@ import (
"sync/atomic"
"time"
"zero/core/logx"
"zero/core/mathx"
"zero/core/syncx"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/mathx"
"github.com/tal-tech/go-zero/core/syncx"
)
const (

@ -4,7 +4,7 @@ import (
"sync"
"time"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/timex"
)
type (

@ -5,9 +5,8 @@ import (
"testing"
"time"
"zero/core/stringx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
)
const duration = time.Millisecond * 50

@ -3,9 +3,8 @@ package collection
import (
"testing"
"zero/core/stringx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
)
func TestSafeMap(t *testing.T) {

@ -1,8 +1,8 @@
package collection
import (
"zero/core/lang"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/logx"
)
const (

@ -5,9 +5,9 @@ import (
"fmt"
"time"
"zero/core/lang"
"zero/core/threading"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/threading"
"github.com/tal-tech/go-zero/core/timex"
)
const drainWorkers = 8

@ -7,12 +7,11 @@ import (
"testing"
"time"
"zero/core/lang"
"zero/core/stringx"
"zero/core/syncx"
"zero/core/timex"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/timex"
)
const (

@ -6,7 +6,7 @@ import (
"log"
"path"
"zero/core/mapping"
"github.com/tal-tech/go-zero/core/mapping"
)
var loaders = map[string]func([]byte, interface{}) error{

@ -6,7 +6,7 @@ import (
"strings"
"sync"
"zero/core/iox"
"github.com/tal-tech/go-zero/core/iox"
)
// PropertyError represents a configuration error message.

@ -4,9 +4,8 @@ import (
"os"
"testing"
"zero/core/fs"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/fs"
)
func TestProperties(t *testing.T) {

@ -3,7 +3,7 @@ package contextx
import (
"context"
"zero/core/mapping"
"github.com/tal-tech/go-zero/core/mapping"
)
const contextTagKey = "ctx"

@ -4,7 +4,7 @@ import (
"fmt"
"strings"
"zero/core/discov/internal"
"github.com/tal-tech/go-zero/core/discov/internal"
)
const (

@ -4,9 +4,8 @@ import (
"sync"
"testing"
"zero/core/discov/internal"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/discov/internal"
)
var mockLock sync.Mutex

@ -1,8 +1,8 @@
package discov
import (
"zero/core/discov/internal"
"zero/core/lang"
"github.com/tal-tech/go-zero/core/discov/internal"
"github.com/tal-tech/go-zero/core/lang"
)
type (

@ -9,12 +9,11 @@ import (
"sync"
"time"
"zero/core/contextx"
"zero/core/lang"
"zero/core/logx"
"zero/core/syncx"
"zero/core/threading"
"github.com/tal-tech/go-zero/core/contextx"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/threading"
"go.etcd.io/etcd/clientv3"
)

@ -5,11 +5,10 @@ import (
"sync"
"testing"
"zero/core/contextx"
"zero/core/stringx"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/contextx"
"github.com/tal-tech/go-zero/core/stringx"
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/mvcc/mvccpb"
)

@ -1,4 +0,0 @@
apiVersion: v1
kind: Namespace
metadata:
name: discov

@ -1,378 +0,0 @@
apiVersion: v1
kind: Service
metadata:
name: etcd
namespace: discov
spec:
ports:
- name: etcd-port
port: 2379
protocol: TCP
targetPort: 2379
selector:
app: etcd
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: etcd
etcd_node: etcd0
name: etcd0
namespace: discov
spec:
containers:
- command:
- /usr/local/bin/etcd
- --name
- etcd0
- --initial-advertise-peer-urls
- http://etcd0:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://etcd0:2379
- --initial-cluster
- etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
- --initial-cluster-state
- new
image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest
name: etcd0
ports:
- containerPort: 2379
name: client
protocol: TCP
- containerPort: 2380
name: server
protocol: TCP
imagePullSecrets:
- name: aliyun
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- etcd
topologyKey: "kubernetes.io/hostname"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
etcd_node: etcd0
name: etcd0
namespace: discov
spec:
ports:
- name: client
port: 2379
protocol: TCP
targetPort: 2379
- name: server
port: 2380
protocol: TCP
targetPort: 2380
selector:
etcd_node: etcd0
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: etcd
etcd_node: etcd1
name: etcd1
namespace: discov
spec:
containers:
- command:
- /usr/local/bin/etcd
- --name
- etcd1
- --initial-advertise-peer-urls
- http://etcd1:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://etcd1:2379
- --initial-cluster
- etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
- --initial-cluster-state
- new
image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest
name: etcd1
ports:
- containerPort: 2379
name: client
protocol: TCP
- containerPort: 2380
name: server
protocol: TCP
imagePullSecrets:
- name: aliyun
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- etcd
topologyKey: "kubernetes.io/hostname"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
etcd_node: etcd1
name: etcd1
namespace: discov
spec:
ports:
- name: client
port: 2379
protocol: TCP
targetPort: 2379
- name: server
port: 2380
protocol: TCP
targetPort: 2380
selector:
etcd_node: etcd1
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: etcd
etcd_node: etcd2
name: etcd2
namespace: discov
spec:
containers:
- command:
- /usr/local/bin/etcd
- --name
- etcd2
- --initial-advertise-peer-urls
- http://etcd2:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://etcd2:2379
- --initial-cluster
- etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
- --initial-cluster-state
- new
image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest
name: etcd2
ports:
- containerPort: 2379
name: client
protocol: TCP
- containerPort: 2380
name: server
protocol: TCP
imagePullSecrets:
- name: aliyun
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- etcd
topologyKey: "kubernetes.io/hostname"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
etcd_node: etcd2
name: etcd2
namespace: discov
spec:
ports:
- name: client
port: 2379
protocol: TCP
targetPort: 2379
- name: server
port: 2380
protocol: TCP
targetPort: 2380
selector:
etcd_node: etcd2
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: etcd
etcd_node: etcd3
name: etcd3
namespace: discov
spec:
containers:
- command:
- /usr/local/bin/etcd
- --name
- etcd3
- --initial-advertise-peer-urls
- http://etcd3:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://etcd3:2379
- --initial-cluster
- etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
- --initial-cluster-state
- new
image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest
name: etcd3
ports:
- containerPort: 2379
name: client
protocol: TCP
- containerPort: 2380
name: server
protocol: TCP
imagePullSecrets:
- name: aliyun
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- etcd
topologyKey: "kubernetes.io/hostname"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
etcd_node: etcd3
name: etcd3
namespace: discov
spec:
ports:
- name: client
port: 2379
protocol: TCP
targetPort: 2379
- name: server
port: 2380
protocol: TCP
targetPort: 2380
selector:
etcd_node: etcd3
---
apiVersion: v1
kind: Pod
metadata:
labels:
app: etcd
etcd_node: etcd4
name: etcd4
namespace: discov
spec:
containers:
- command:
- /usr/local/bin/etcd
- --name
- etcd4
- --initial-advertise-peer-urls
- http://etcd4:2380
- --listen-peer-urls
- http://0.0.0.0:2380
- --listen-client-urls
- http://0.0.0.0:2379
- --advertise-client-urls
- http://etcd4:2379
- --initial-cluster
- etcd0=http://etcd0:2380,etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380,etcd4=http://etcd4:2380
- --initial-cluster-state
- new
image: registry-vpc.cn-hangzhou.aliyuncs.com/xapp/etcd:latest
name: etcd4
ports:
- containerPort: 2379
name: client
protocol: TCP
- containerPort: 2380
name: server
protocol: TCP
imagePullSecrets:
- name: aliyun
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- etcd
topologyKey: "kubernetes.io/hostname"
restartPolicy: Always
---
apiVersion: v1
kind: Service
metadata:
labels:
etcd_node: etcd4
name: etcd4
namespace: discov
spec:
ports:
- name: client
port: 2379
protocol: TCP
targetPort: 2379
- name: server
port: 2380
protocol: TCP
targetPort: 2380
selector:
etcd_node: etcd4

@ -1,13 +1,12 @@
package discov
import (
"zero/core/discov/internal"
"zero/core/lang"
"zero/core/logx"
"zero/core/proc"
"zero/core/syncx"
"zero/core/threading"
"github.com/tal-tech/go-zero/core/discov/internal"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/proc"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/threading"
"go.etcd.io/etcd/clientv3"
)

@ -5,11 +5,10 @@ import (
"sync"
"testing"
"zero/core/discov/internal"
"zero/core/logx"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/discov/internal"
"github.com/tal-tech/go-zero/core/logx"
"go.etcd.io/etcd/clientv3"
)

@ -4,8 +4,8 @@ import (
"sync"
"sync/atomic"
"zero/core/discov/internal"
"zero/core/syncx"
"github.com/tal-tech/go-zero/core/discov/internal"
"github.com/tal-tech/go-zero/core/syncx"
)
type (

@ -3,9 +3,8 @@ package discov
import (
"testing"
"zero/core/discov/internal"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/discov/internal"
)
const (

@ -1,8 +1,6 @@
package executors
import (
"time"
)
import "time"
const defaultBulkTasks = 1000

@ -4,7 +4,7 @@ import (
"sync"
"time"
"zero/core/threading"
"github.com/tal-tech/go-zero/core/threading"
)
type DelayExecutor struct {

@ -3,8 +3,8 @@ package executors
import (
"time"
"zero/core/syncx"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/timex"
)
type LessExecutor struct {

@ -4,9 +4,8 @@ import (
"testing"
"time"
"zero/core/timex"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/timex"
)
func TestLessExecutor_DoOrDiscard(t *testing.T) {

@ -5,10 +5,10 @@ import (
"sync"
"time"
"zero/core/proc"
"zero/core/syncx"
"zero/core/threading"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/proc"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/threading"
"github.com/tal-tech/go-zero/core/timex"
)
const idleRound = 10

@ -7,9 +7,8 @@ import (
"testing"
"time"
"zero/core/timex"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/timex"
)
const threshold = 10

@ -4,7 +4,7 @@ import (
"os"
"testing"
"zero/core/fs"
"github.com/tal-tech/go-zero/core/fs"
"github.com/stretchr/testify/assert"
)

@ -4,9 +4,8 @@ import (
"os"
"testing"
"zero/core/fs"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/fs"
)
func TestSplitLineChunks(t *testing.T) {

@ -5,8 +5,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"zero/core/fs"
"github.com/tal-tech/go-zero/core/fs"
)
func TestRangeReader(t *testing.T) {

@ -4,7 +4,7 @@ import (
"io/ioutil"
"os"
"zero/core/hash"
"github.com/tal-tech/go-zero/core/hash"
)
// TempFileWithText creates the temporary file with the given content,

@ -4,9 +4,9 @@ import (
"sort"
"sync"
"zero/core/collection"
"zero/core/lang"
"zero/core/threading"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/threading"
)
const (

@ -9,9 +9,8 @@ import (
"testing"
"time"
"zero/core/stringx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
)
func TestBuffer(t *testing.T) {

@ -1,6 +1,6 @@
package fx
import "zero/core/threading"
import "github.com/tal-tech/go-zero/core/threading"
func Parallel(fns ...func()) {
group := threading.NewRoutineGroup()

@ -1,6 +1,6 @@
package fx
import "zero/core/errorx"
import "github.com/tal-tech/go-zero/core/errorx"
const defaultRetryTimes = 3

@ -6,8 +6,8 @@ import (
"strconv"
"sync"
"zero/core/lang"
"zero/core/mapping"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/mapping"
)
const (

@ -6,8 +6,7 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"zero/core/mathx"
"github.com/tal-tech/go-zero/core/mathx"
)
const (

@ -8,10 +8,9 @@ import (
"testing"
"time"
"zero/core/fs"
"zero/core/stringx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/fs"
"github.com/tal-tech/go-zero/core/stringx"
)
func TestReadText(t *testing.T) {

@ -5,7 +5,7 @@ import (
"strconv"
"time"
"zero/core/stores/redis"
"github.com/tal-tech/go-zero/core/stores/redis"
)
const (

@ -3,10 +3,9 @@ package limit
import (
"testing"
"zero/core/stores/redis"
"github.com/alicebob/miniredis"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stores/redis"
)
func TestPeriodLimit_Take(t *testing.T) {

@ -7,9 +7,8 @@ import (
"sync/atomic"
"time"
"zero/core/logx"
"zero/core/stores/redis"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stores/redis"
xrate "golang.org/x/time/rate"
)

@ -4,11 +4,10 @@ import (
"testing"
"time"
"zero/core/logx"
"zero/core/stores/redis"
"github.com/alicebob/miniredis"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stores/redis"
)
func init() {

@ -7,11 +7,11 @@ import (
"sync/atomic"
"time"
"zero/core/collection"
"zero/core/logx"
"zero/core/stat"
"zero/core/syncx"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stat"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/timex"
)
const (

@ -7,13 +7,12 @@ import (
"testing"
"time"
"zero/core/collection"
"zero/core/logx"
"zero/core/mathx"
"zero/core/stat"
"zero/core/syncx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/collection"
"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/syncx"
)
const (

@ -3,7 +3,7 @@ package load
import (
"io"
"zero/core/syncx"
"github.com/tal-tech/go-zero/core/syncx"
)
type ShedderGroup struct {

@ -4,8 +4,8 @@ import (
"sync/atomic"
"time"
"zero/core/logx"
"zero/core/stat"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stat"
)
type (

@ -5,7 +5,7 @@ import (
"io"
"time"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/timex"
)
const customCallerDepth = 3

@ -4,8 +4,8 @@ import (
"sync/atomic"
"time"
"zero/core/syncx"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/timex"
)
type limitedExecutor struct {

@ -16,10 +16,10 @@ import (
"sync"
"sync/atomic"
"zero/core/iox"
"zero/core/lang"
"zero/core/sysx"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/iox"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/sysx"
"github.com/tal-tech/go-zero/core/timex"
)
const (

@ -13,9 +13,9 @@ import (
"sync"
"time"
"zero/core/fs"
"zero/core/lang"
"zero/core/timex"
"github.com/tal-tech/go-zero/core/fs"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/timex"
)
const (

@ -5,7 +5,7 @@ import (
"fmt"
"io"
"zero/core/trace/tracespec"
"github.com/tal-tech/go-zero/core/trace/tracespec"
)
type tracingEntry struct {

@ -5,9 +5,8 @@ import (
"strings"
"testing"
"zero/core/trace/tracespec"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/trace/tracespec"
)
const (

@ -3,7 +3,7 @@ package mapping
import (
"io"
"zero/core/jsonx"
"github.com/tal-tech/go-zero/core/jsonx"
)
const jsonTagKey = "json"

@ -10,9 +10,9 @@ import (
"sync/atomic"
"time"
"zero/core/jsonx"
"zero/core/lang"
"zero/core/stringx"
"github.com/tal-tech/go-zero/core/jsonx"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/stringx"
)
const (

@ -6,9 +6,8 @@ import (
"testing"
"time"
"zero/core/stringx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
)
// because json.Number doesn't support strconv.ParseUint(...),

@ -10,7 +10,7 @@ import (
"strings"
"sync"
"zero/core/stringx"
"github.com/tal-tech/go-zero/core/stringx"
)
const (

@ -3,9 +3,8 @@ package mathx
import (
"testing"
"zero/core/stringx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
)
func TestMaxInt(t *testing.T) {

@ -1,9 +1,8 @@
package metric
import (
"zero/core/proc"
prom "github.com/prometheus/client_golang/prometheus"
"github.com/tal-tech/go-zero/core/proc"
)
type (

@ -1,9 +1,8 @@
package metric
import (
"zero/core/proc"
prom "github.com/prometheus/client_golang/prometheus"
"github.com/tal-tech/go-zero/core/proc"
)
type (

@ -1,9 +1,8 @@
package metric
import (
"zero/core/proc"
prom "github.com/prometheus/client_golang/prometheus"
"github.com/tal-tech/go-zero/core/proc"
)
type (

@ -5,10 +5,10 @@ import (
"fmt"
"sync"
"zero/core/errorx"
"zero/core/lang"
"zero/core/syncx"
"zero/core/threading"
"github.com/tal-tech/go-zero/core/errorx"
"github.com/tal-tech/go-zero/core/lang"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/threading"
)
const (

@ -9,10 +9,9 @@ import (
"testing"
"time"
"zero/core/stringx"
"zero/core/syncx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/stringx"
"github.com/tal-tech/go-zero/core/syncx"
)
var errDummy = errors.New("dummy")

@ -10,7 +10,7 @@ import (
"syscall"
"time"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
const (

@ -14,7 +14,7 @@ import (
"syscall"
"time"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
// DefaultMemProfileRate is the default memory profiling rate.

@ -9,7 +9,7 @@ import (
"syscall"
"time"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
const (

@ -7,7 +7,7 @@ import (
"os/signal"
"syscall"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
const timeFormat = "0102150405"

@ -7,10 +7,9 @@ import (
"sync/atomic"
"time"
"zero/core/logx"
"zero/core/threading"
"github.com/olekukonko/tablewriter"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/threading"
)
type (

@ -1,6 +1,6 @@
package prof
import "zero/core/utils"
import "github.com/tal-tech/go-zero/core/utils"
type (
ProfilePoint struct {

@ -5,10 +5,9 @@ import (
"net/http"
"sync"
"zero/core/logx"
"zero/core/threading"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/threading"
)
var once sync.Once

@ -1,6 +1,6 @@
package rescue
import "zero/core/logx"
import "github.com/tal-tech/go-zero/core/logx"
func Recover(cleanups ...func()) {
for _, cleanup := range cleanups {

@ -4,9 +4,8 @@ import (
"sync/atomic"
"testing"
"zero/core/logx"
"github.com/stretchr/testify/assert"
"github.com/tal-tech/go-zero/core/logx"
)
func init() {

@ -3,10 +3,10 @@ package service
import (
"log"
"zero/core/load"
"zero/core/logx"
"zero/core/prometheus"
"zero/core/stat"
"github.com/tal-tech/go-zero/core/load"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/prometheus"
"github.com/tal-tech/go-zero/core/stat"
)
const (

@ -3,9 +3,9 @@ package service
import (
"log"
"zero/core/proc"
"zero/core/syncx"
"zero/core/threading"
"github.com/tal-tech/go-zero/core/proc"
"github.com/tal-tech/go-zero/core/syncx"
"github.com/tal-tech/go-zero/core/threading"
)
type (

@ -10,11 +10,11 @@ import (
"sync/atomic"
"time"
"zero/core/executors"
"zero/core/proc"
"zero/core/sysx"
"zero/core/timex"
"zero/core/utils"
"github.com/tal-tech/go-zero/core/executors"
"github.com/tal-tech/go-zero/core/proc"
"github.com/tal-tech/go-zero/core/sysx"
"github.com/tal-tech/go-zero/core/timex"
"github.com/tal-tech/go-zero/core/utils"
)
const (

@ -7,8 +7,8 @@ import (
"strconv"
"strings"
"zero/core/iox"
"zero/core/lang"
"github.com/tal-tech/go-zero/core/iox"
"github.com/tal-tech/go-zero/core/lang"
)
const cgroupDir = "/sys/fs/cgroup"

@ -6,8 +6,8 @@ import (
"strings"
"time"
"zero/core/iox"
"zero/core/lang"
"github.com/tal-tech/go-zero/core/iox"
"github.com/tal-tech/go-zero/core/lang"
)
const (

@ -5,8 +5,8 @@ import (
"sync"
"time"
"zero/core/executors"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/executors"
"github.com/tal-tech/go-zero/core/logx"
)
var (

@ -7,7 +7,7 @@ import (
"net/http"
"time"
"zero/core/logx"
"github.com/tal-tech/go-zero/core/logx"
)
const httpTimeout = time.Second * 5

@ -5,9 +5,9 @@ import (
"sync/atomic"
"time"
"zero/core/logx"
"zero/core/stat/internal"
"zero/core/threading"
"github.com/tal-tech/go-zero/core/logx"
"github.com/tal-tech/go-zero/core/stat/internal"
"github.com/tal-tech/go-zero/core/threading"
)
const (

@ -1,5 +1,5 @@
package cache
import "zero/core/stores/internal"
import "github.com/tal-tech/go-zero/core/stores/internal"
type CacheConf = internal.ClusterConf

@ -3,7 +3,7 @@ package cache
import (
"time"
"zero/core/stores/internal"
"github.com/tal-tech/go-zero/core/stores/internal"
)
type Option = internal.Option

@ -1,9 +1,8 @@
package clickhouse
import (
"zero/core/stores/sqlx"
_ "github.com/kshvakov/clickhouse"
"github.com/tal-tech/go-zero/core/stores/sqlx"
)
const clickHouseDriverName = "clickhouse"

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

@ -8,13 +8,12 @@ import (
"testing"
"time"
"zero/core/errorx"
"zero/core/hash"
"zero/core/stores/redis"
"zero/core/syncx"
"github.com/alicebob/miniredis"
"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/syncx"
)
type mockedNode struct {

@ -8,11 +8,11 @@ import (
"sync"
"time"
"zero/core/logx"
"zero/core/mathx"
"zero/core/stat"
"zero/core/stores/redis"
"zero/core/syncx"
"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"
)
const (

@ -7,13 +7,12 @@ import (
"testing"
"time"
"zero/core/logx"
"zero/core/mathx"
"zero/core/stat"
"zero/core/stores/redis"
"github.com/alicebob/miniredis"
"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"
)
func init() {

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

@ -4,13 +4,13 @@ import (
"fmt"
"time"
"zero/core/collection"
"zero/core/lang"
"zero/core/logx"
"zero/core/proc"
"zero/core/stat"
"zero/core/stringx"
"zero/core/threading"
"github.com/tal-tech/go-zero/core/collection"
"github.com/tal-tech/go-zero/core/lang"
"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"
)
const (

@ -1,6 +1,6 @@
package internal
import "zero/core/stores/redis"
import "github.com/tal-tech/go-zero/core/stores/redis"
type (
ClusterConf []NodeConf

@ -1,5 +1,5 @@
package kv
import "zero/core/stores/internal"
import "github.com/tal-tech/go-zero/core/stores/internal"
type KvConf = internal.ClusterConf

@ -4,10 +4,10 @@ import (
"errors"
"log"
"zero/core/errorx"
"zero/core/hash"
"zero/core/stores/internal"
"zero/core/stores/redis"
"github.com/tal-tech/go-zero/core/errorx"
"github.com/tal-tech/go-zero/core/hash"
"github.com/tal-tech/go-zero/core/stores/internal"
"github.com/tal-tech/go-zero/core/stores/redis"
)
var ErrNoRedisNode = errors.New("no redis node")

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save