diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 27ba96d..44d940d 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -9,5 +9,5 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v2 with: - version: v1.48.0 + version: v1.55.2 args: --timeout=5m --skip-dirs='test,examples' --enable gofmt,golint,gocyclo,goimports --skip-files=.*_test.go$ diff --git a/README.md b/README.md index 246b5da..e1a9d16 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ Step 1. Import the module and it's all plugins. ```go import ( - github.com/little-cui/etcdadpt - _ "github.com/little-cui/etcdadpt/embedded" - _ "github.com/little-cui/etcdadpt/remote" + github.com/go-chassis/etcdadpt + _ "github.com/go-chassis/etcdadpt/embedded" + _ "github.com/go-chassis/etcdadpt/remote" ) ``` diff --git a/api_test.go b/api_test.go index 17f2221..c2692fe 100644 --- a/api_test.go +++ b/api_test.go @@ -24,9 +24,9 @@ import ( "sync" "testing" - _ "github.com/little-cui/etcdadpt/test" + _ "github.com/go-chassis/etcdadpt/test" - "github.com/little-cui/etcdadpt" + "github.com/go-chassis/etcdadpt" "github.com/stretchr/testify/assert" ) diff --git a/buildin/buildin.go b/buildin/buildin.go index 75e82ba..aea68ab 100644 --- a/buildin/buildin.go +++ b/buildin/buildin.go @@ -20,7 +20,7 @@ package buildin import ( "context" - "github.com/little-cui/etcdadpt" + "github.com/go-chassis/etcdadpt" ) var ( diff --git a/embedded/embedded_etcd.go b/embedded/embedded_etcd.go index 575f683..46248ca 100644 --- a/embedded/embedded_etcd.go +++ b/embedded/embedded_etcd.go @@ -34,16 +34,16 @@ import ( "go.etcd.io/etcd/server/v3/etcdserver/api/v3compactor" "go.etcd.io/etcd/server/v3/lease" + "github.com/go-chassis/etcdadpt" + "github.com/go-chassis/etcdadpt/middleware/log" "github.com/go-chassis/foundation/gopool" "github.com/go-chassis/foundation/stringutil" - "github.com/little-cui/etcdadpt" - "github.com/little-cui/etcdadpt/middleware/log" ) const DefaultDataDir = "data" func init() { - etcdadpt.Install("embeded_etcd", NewEmbeddedEtcd) //TODO remove misspell in future + etcdadpt.Install("embeded_etcd", NewEmbeddedEtcd) // TODO remove misspell in future etcdadpt.Install("embedded_etcd", NewEmbeddedEtcd) } diff --git a/examples/dev/main.go b/examples/dev/main.go index 30185ad..bd6f86f 100644 --- a/examples/dev/main.go +++ b/examples/dev/main.go @@ -22,11 +22,11 @@ import ( "fmt" "os" - _ "github.com/little-cui/etcdadpt/embedded" - _ "github.com/little-cui/etcdadpt/remote" + _ "github.com/go-chassis/etcdadpt/embedded" + _ "github.com/go-chassis/etcdadpt/remote" + "github.com/go-chassis/etcdadpt" "github.com/go-chassis/openlog" - "github.com/little-cui/etcdadpt" ) func main() { diff --git a/go.mod b/go.mod index f66ab5e..94cd053 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/little-cui/etcdadpt +module github.com/go-chassis/etcdadpt go 1.17 diff --git a/manager.go b/manager.go index 0876449..c01036d 100644 --- a/manager.go +++ b/manager.go @@ -22,8 +22,8 @@ import ( "fmt" "time" + "github.com/go-chassis/etcdadpt/middleware/log" "github.com/go-chassis/foundation/backoff" - "github.com/little-cui/etcdadpt/middleware/log" ) var ( diff --git a/manager_test.go b/manager_test.go index dffdaf7..e38592a 100644 --- a/manager_test.go +++ b/manager_test.go @@ -20,9 +20,9 @@ package etcdadpt_test import ( "testing" - _ "github.com/little-cui/etcdadpt/test" + _ "github.com/go-chassis/etcdadpt/test" - "github.com/little-cui/etcdadpt" + "github.com/go-chassis/etcdadpt" "github.com/stretchr/testify/assert" ) diff --git a/middleware/log/logger_test.go b/middleware/log/logger_test.go index a99cf4c..222c9ad 100644 --- a/middleware/log/logger_test.go +++ b/middleware/log/logger_test.go @@ -19,8 +19,8 @@ package log_test import ( "testing" + "github.com/go-chassis/etcdadpt/middleware/log" "github.com/go-chassis/openlog" - "github.com/little-cui/etcdadpt/middleware/log" "github.com/stretchr/testify/assert" ) diff --git a/middleware/tracing/tracer.go b/middleware/tracing/tracer.go index db1e0af..cc9d5b8 100644 --- a/middleware/tracing/tracer.go +++ b/middleware/tracing/tracer.go @@ -20,7 +20,7 @@ package tracing import ( "context" - "github.com/little-cui/etcdadpt" + "github.com/go-chassis/etcdadpt" ) var globalTracer Tracer diff --git a/mutex.go b/mutex.go index 50b7548..036c6eb 100644 --- a/mutex.go +++ b/mutex.go @@ -28,8 +28,8 @@ import ( "github.com/go-chassis/foundation/gopool" "github.com/go-chassis/openlog" - "github.com/little-cui/etcdadpt/middleware/log" - "github.com/little-cui/etcdadpt/middleware/metrics" + "github.com/go-chassis/etcdadpt/middleware/log" + "github.com/go-chassis/etcdadpt/middleware/metrics" ) const ( diff --git a/mutex_test.go b/mutex_test.go index 9fdf836..2addaf4 100644 --- a/mutex_test.go +++ b/mutex_test.go @@ -23,9 +23,9 @@ import ( "testing" "time" - _ "github.com/little-cui/etcdadpt/test" + _ "github.com/go-chassis/etcdadpt/test" - "github.com/little-cui/etcdadpt" + "github.com/go-chassis/etcdadpt" "github.com/stretchr/testify/assert" ) diff --git a/remote/client.go b/remote/client.go index 972fada..034a982 100644 --- a/remote/client.go +++ b/remote/client.go @@ -27,10 +27,10 @@ import ( clientv3 "go.etcd.io/etcd/client/v3" + "github.com/go-chassis/etcdadpt" + "github.com/go-chassis/etcdadpt/middleware/log" + "github.com/go-chassis/etcdadpt/middleware/metrics" "github.com/go-chassis/foundation/gopool" - "github.com/little-cui/etcdadpt" - "github.com/little-cui/etcdadpt/middleware/log" - "github.com/little-cui/etcdadpt/middleware/metrics" ) var FirstEndpoint string diff --git a/remote/client_test.go b/remote/client_test.go index 591f47a..bf2971f 100644 --- a/remote/client_test.go +++ b/remote/client_test.go @@ -23,8 +23,8 @@ import ( "testing" "time" - "github.com/little-cui/etcdadpt" - "github.com/little-cui/etcdadpt/remote" + "github.com/go-chassis/etcdadpt" + "github.com/go-chassis/etcdadpt/remote" "github.com/stretchr/testify/assert" "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/mvccpb" diff --git a/remote/healthz.go b/remote/healthz.go index 24011f5..642eabe 100644 --- a/remote/healthz.go +++ b/remote/healthz.go @@ -24,8 +24,8 @@ import ( "github.com/go-chassis/foundation/backoff" - "github.com/little-cui/etcdadpt/middleware/log" - "github.com/little-cui/etcdadpt/middleware/metrics" + "github.com/go-chassis/etcdadpt/middleware/log" + "github.com/go-chassis/etcdadpt/middleware/metrics" ) func (c *Client) HealthCheck() { diff --git a/remote/kv.go b/remote/kv.go index 91918ea..f86cb88 100644 --- a/remote/kv.go +++ b/remote/kv.go @@ -22,9 +22,9 @@ import ( "fmt" "time" + "github.com/go-chassis/etcdadpt" + "github.com/go-chassis/etcdadpt/middleware/metrics" "github.com/go-chassis/foundation/stringutil" - "github.com/little-cui/etcdadpt" - "github.com/little-cui/etcdadpt/middleware/metrics" "go.etcd.io/etcd/api/v3/mvccpb" clientv3 "go.etcd.io/etcd/client/v3" ) diff --git a/remote/lease.go b/remote/lease.go index 96aad63..e1b7cce 100644 --- a/remote/lease.go +++ b/remote/lease.go @@ -23,9 +23,9 @@ import ( "strconv" "time" + "github.com/go-chassis/etcdadpt" + "github.com/go-chassis/etcdadpt/middleware/metrics" "github.com/go-chassis/foundation/stringutil" - "github.com/little-cui/etcdadpt" - "github.com/little-cui/etcdadpt/middleware/metrics" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" clientv3 "go.etcd.io/etcd/client/v3" ) diff --git a/remote/log.go b/remote/log.go index 25320c0..373d0e8 100644 --- a/remote/log.go +++ b/remote/log.go @@ -21,7 +21,7 @@ import ( "fmt" "time" - "github.com/little-cui/etcdadpt/middleware/log" + "github.com/go-chassis/etcdadpt/middleware/log" ) func (c *Client) logRecover(r interface{}) { diff --git a/remote/ops.go b/remote/ops.go index fdedd70..c328945 100644 --- a/remote/ops.go +++ b/remote/ops.go @@ -25,9 +25,9 @@ import ( clientv3 "go.etcd.io/etcd/client/v3" - "github.com/little-cui/etcdadpt" - "github.com/little-cui/etcdadpt/middleware/log" - "github.com/little-cui/etcdadpt/middleware/metrics" + "github.com/go-chassis/etcdadpt" + "github.com/go-chassis/etcdadpt/middleware/log" + "github.com/go-chassis/etcdadpt/middleware/metrics" ) var ErrGetLeaderFailed = errors.New("get leader failed") diff --git a/remote/options.go b/remote/options.go index f6f0a97..c2c10e2 100644 --- a/remote/options.go +++ b/remote/options.go @@ -18,8 +18,8 @@ package remote import ( + "github.com/go-chassis/etcdadpt" "github.com/go-chassis/foundation/stringutil" - "github.com/little-cui/etcdadpt" clientv3 "go.etcd.io/etcd/client/v3" ) diff --git a/remote/tracing.go b/remote/tracing.go index 3325f89..b3b9d10 100644 --- a/remote/tracing.go +++ b/remote/tracing.go @@ -21,8 +21,8 @@ import ( "context" "net/http" - "github.com/little-cui/etcdadpt" - "github.com/little-cui/etcdadpt/middleware/tracing" + "github.com/go-chassis/etcdadpt" + "github.com/go-chassis/etcdadpt/middleware/tracing" ) func TracingBegin(ctx context.Context, operationName string, op etcdadpt.OpOptions) interface{} { diff --git a/remote/txn.go b/remote/txn.go index a62b4e1..34e4c85 100644 --- a/remote/txn.go +++ b/remote/txn.go @@ -24,8 +24,8 @@ import ( "go.etcd.io/etcd/api/v3/etcdserverpb" - "github.com/little-cui/etcdadpt" - "github.com/little-cui/etcdadpt/middleware/metrics" + "github.com/go-chassis/etcdadpt" + "github.com/go-chassis/etcdadpt/middleware/metrics" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" clientv3 "go.etcd.io/etcd/client/v3" ) diff --git a/remote/watch.go b/remote/watch.go index 6428e96..3f55a1c 100644 --- a/remote/watch.go +++ b/remote/watch.go @@ -22,8 +22,8 @@ import ( "errors" "fmt" + "github.com/go-chassis/etcdadpt" "github.com/go-chassis/foundation/stringutil" - "github.com/little-cui/etcdadpt" "go.etcd.io/etcd/api/v3/mvccpb" clientv3 "go.etcd.io/etcd/client/v3" ) diff --git a/test/init.go b/test/init.go index b438f03..c1453d1 100644 --- a/test/init.go +++ b/test/init.go @@ -20,10 +20,10 @@ package test import ( "os" - _ "github.com/little-cui/etcdadpt/embedded" - _ "github.com/little-cui/etcdadpt/remote" + _ "github.com/go-chassis/etcdadpt/embedded" + _ "github.com/go-chassis/etcdadpt/remote" - "github.com/little-cui/etcdadpt" + "github.com/go-chassis/etcdadpt" ) func init() {