diff --git a/client/pkg/fileutil/fileutil.go b/client/pkg/fileutil/fileutil.go index 3d1a9d426556..3bedee7d2b3d 100644 --- a/client/pkg/fileutil/fileutil.go +++ b/client/pkg/fileutil/fileutil.go @@ -21,8 +21,9 @@ import ( "os" "path/filepath" - "go.etcd.io/etcd/client/pkg/v3/verify" "go.uber.org/zap" + + "go.etcd.io/etcd/client/pkg/v3/verify" ) const ( diff --git a/client/pkg/testutil/before.go b/client/pkg/testutil/before.go index fd28e6bb2d8b..1f8c1fa72a5e 100644 --- a/client/pkg/testutil/before.go +++ b/client/pkg/testutil/before.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "go.etcd.io/etcd/client/pkg/v3/verify" ) diff --git a/client/v2/keys.go b/client/v2/keys.go index 7eb927e56295..fa8fdc6b2616 100644 --- a/client/v2/keys.go +++ b/client/v2/keys.go @@ -25,8 +25,9 @@ import ( "strings" "time" - "go.etcd.io/etcd/client/pkg/v3/pathutil" kjson "sigs.k8s.io/json" + + "go.etcd.io/etcd/client/pkg/v3/pathutil" ) const ( diff --git a/client/v3/auth.go b/client/v3/auth.go index a6f75d321592..ae85ec9a942a 100644 --- a/client/v3/auth.go +++ b/client/v3/auth.go @@ -19,9 +19,10 @@ import ( "fmt" "strings" + "google.golang.org/grpc" + "go.etcd.io/etcd/api/v3/authpb" pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "google.golang.org/grpc" ) type ( diff --git a/client/v3/client.go b/client/v3/client.go index f91f1ea76a97..0c91889fa336 100644 --- a/client/v3/client.go +++ b/client/v3/client.go @@ -23,11 +23,6 @@ import ( "sync" "time" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - "go.etcd.io/etcd/client/pkg/v3/logutil" - "go.etcd.io/etcd/client/v3/credentials" - "go.etcd.io/etcd/client/v3/internal/endpoint" - "go.etcd.io/etcd/client/v3/internal/resolver" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -35,6 +30,12 @@ import ( "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/keepalive" "google.golang.org/grpc/status" + + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + "go.etcd.io/etcd/client/pkg/v3/logutil" + "go.etcd.io/etcd/client/v3/credentials" + "go.etcd.io/etcd/client/v3/internal/endpoint" + "go.etcd.io/etcd/client/v3/internal/resolver" ) var ( diff --git a/client/v3/concurrency/session.go b/client/v3/concurrency/session.go index 8ab482077db9..8838b77e2d7c 100644 --- a/client/v3/concurrency/session.go +++ b/client/v3/concurrency/session.go @@ -18,8 +18,9 @@ import ( "context" "time" - v3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" + + v3 "go.etcd.io/etcd/client/v3" ) const defaultSessionTTL = 60 diff --git a/client/v3/credentials/credentials.go b/client/v3/credentials/credentials.go index 42f688eb359c..024c16b6048d 100644 --- a/client/v3/credentials/credentials.go +++ b/client/v3/credentials/credentials.go @@ -22,8 +22,9 @@ import ( "net" "sync" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" grpccredentials "google.golang.org/grpc/credentials" + + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" ) // Config defines gRPC credential configuration. diff --git a/client/v3/ctx.go b/client/v3/ctx.go index 56b69cf2ede8..38cee6c27e4a 100644 --- a/client/v3/ctx.go +++ b/client/v3/ctx.go @@ -17,9 +17,10 @@ package clientv3 import ( "context" + "google.golang.org/grpc/metadata" + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.etcd.io/etcd/api/v3/version" - "google.golang.org/grpc/metadata" ) // WithRequireLeader requires client requests to only succeed diff --git a/client/v3/internal/resolver/resolver.go b/client/v3/internal/resolver/resolver.go index 3ee3cb8e2bb9..b5c9de00786e 100644 --- a/client/v3/internal/resolver/resolver.go +++ b/client/v3/internal/resolver/resolver.go @@ -15,10 +15,11 @@ package resolver import ( - "go.etcd.io/etcd/client/v3/internal/endpoint" "google.golang.org/grpc/resolver" "google.golang.org/grpc/resolver/manual" "google.golang.org/grpc/serviceconfig" + + "go.etcd.io/etcd/client/v3/internal/endpoint" ) const ( diff --git a/client/v3/logger.go b/client/v3/logger.go index 7c688c356384..300363cd25ba 100644 --- a/client/v3/logger.go +++ b/client/v3/logger.go @@ -18,10 +18,11 @@ import ( "log" "os" - "go.etcd.io/etcd/client/pkg/v3/logutil" "go.uber.org/zap/zapcore" "go.uber.org/zap/zapgrpc" "google.golang.org/grpc/grpclog" + + "go.etcd.io/etcd/client/pkg/v3/logutil" ) func init() { diff --git a/client/v3/maintenance.go b/client/v3/maintenance.go index f47808d5f925..082b77f1a5a4 100644 --- a/client/v3/maintenance.go +++ b/client/v3/maintenance.go @@ -20,9 +20,10 @@ import ( "fmt" "io" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.uber.org/zap" "google.golang.org/grpc" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" ) type ( diff --git a/client/v3/retry_interceptor.go b/client/v3/retry_interceptor.go index e692b1c30de1..7beb3519eee8 100644 --- a/client/v3/retry_interceptor.go +++ b/client/v3/retry_interceptor.go @@ -24,12 +24,13 @@ import ( "sync" "time" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" ) // unaryClientInterceptor returns a new retrying unary client interceptor. diff --git a/client/v3/snapshot/v3_snapshot.go b/client/v3/snapshot/v3_snapshot.go index 10b51885e4c7..3e36198422e8 100644 --- a/client/v3/snapshot/v3_snapshot.go +++ b/client/v3/snapshot/v3_snapshot.go @@ -23,9 +23,10 @@ import ( "time" "github.com/dustin/go-humanize" + "go.uber.org/zap" + "go.etcd.io/etcd/client/pkg/v3/fileutil" clientv3 "go.etcd.io/etcd/client/v3" - "go.uber.org/zap" ) // hasChecksum returns "true" if the file size "n" diff --git a/client/v3/watch.go b/client/v3/watch.go index e35eb528c2b7..276955cd6e5f 100644 --- a/client/v3/watch.go +++ b/client/v3/watch.go @@ -21,14 +21,15 @@ import ( "sync" "time" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/api/v3/mvccpb" - v3rpc "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/api/v3/mvccpb" + v3rpc "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" ) const ( diff --git a/etcdctl/ctlv3/command/alarm_command.go b/etcdctl/ctlv3/command/alarm_command.go index 556ae11e3d0e..679f9d98f27c 100644 --- a/etcdctl/ctlv3/command/alarm_command.go +++ b/etcdctl/ctlv3/command/alarm_command.go @@ -18,6 +18,7 @@ import ( "fmt" "github.com/spf13/cobra" + v3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/auth_command.go b/etcdctl/ctlv3/command/auth_command.go index e163dc68198f..0e443450013d 100644 --- a/etcdctl/ctlv3/command/auth_command.go +++ b/etcdctl/ctlv3/command/auth_command.go @@ -18,6 +18,7 @@ import ( "fmt" "github.com/spf13/cobra" + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/compaction_command.go b/etcdctl/ctlv3/command/compaction_command.go index f4d27a35f781..5c0bb1019a92 100644 --- a/etcdctl/ctlv3/command/compaction_command.go +++ b/etcdctl/ctlv3/command/compaction_command.go @@ -19,6 +19,7 @@ import ( "strconv" "github.com/spf13/cobra" + clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/defrag_command.go b/etcdctl/ctlv3/command/defrag_command.go index dfccafb74467..253847746a8b 100644 --- a/etcdctl/ctlv3/command/defrag_command.go +++ b/etcdctl/ctlv3/command/defrag_command.go @@ -20,6 +20,7 @@ import ( "time" "github.com/spf13/cobra" + "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/del_command.go b/etcdctl/ctlv3/command/del_command.go index 31d929b19c39..51b7abb3edf8 100644 --- a/etcdctl/ctlv3/command/del_command.go +++ b/etcdctl/ctlv3/command/del_command.go @@ -20,6 +20,7 @@ import ( "time" "github.com/spf13/cobra" + clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/downgrade_command.go b/etcdctl/ctlv3/command/downgrade_command.go index bccae16c339d..8b6ab9cd19e3 100644 --- a/etcdctl/ctlv3/command/downgrade_command.go +++ b/etcdctl/ctlv3/command/downgrade_command.go @@ -18,6 +18,7 @@ import ( "errors" "github.com/spf13/cobra" + clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/get_command.go b/etcdctl/ctlv3/command/get_command.go index 769a95d49765..a18cc32b97c3 100644 --- a/etcdctl/ctlv3/command/get_command.go +++ b/etcdctl/ctlv3/command/get_command.go @@ -19,6 +19,7 @@ import ( "strings" "github.com/spf13/cobra" + clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/global.go b/etcdctl/ctlv3/command/global.go index 50e164568cec..6997b94bdb66 100644 --- a/etcdctl/ctlv3/command/global.go +++ b/etcdctl/ctlv3/command/global.go @@ -23,6 +23,7 @@ import ( "time" "github.com/bgentry/speakeasy" + "go.etcd.io/etcd/client/pkg/v3/logutil" "go.etcd.io/etcd/client/pkg/v3/srv" "go.etcd.io/etcd/client/pkg/v3/transport" diff --git a/etcdctl/ctlv3/command/make_mirror_command.go b/etcdctl/ctlv3/command/make_mirror_command.go index 101a4b84c84e..1665330e835f 100644 --- a/etcdctl/ctlv3/command/make_mirror_command.go +++ b/etcdctl/ctlv3/command/make_mirror_command.go @@ -23,6 +23,7 @@ import ( "time" "github.com/bgentry/speakeasy" + "go.etcd.io/etcd/pkg/v3/cobrautl" "go.etcd.io/etcd/api/v3/mvccpb" diff --git a/etcdctl/ctlv3/command/member_command.go b/etcdctl/ctlv3/command/member_command.go index f5729097e235..53b624b98819 100644 --- a/etcdctl/ctlv3/command/member_command.go +++ b/etcdctl/ctlv3/command/member_command.go @@ -21,6 +21,7 @@ import ( "strings" "github.com/spf13/cobra" + clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/move_leader_command.go b/etcdctl/ctlv3/command/move_leader_command.go index 7d78c738c058..a7b4f397b1c8 100644 --- a/etcdctl/ctlv3/command/move_leader_command.go +++ b/etcdctl/ctlv3/command/move_leader_command.go @@ -19,6 +19,7 @@ import ( "strconv" "github.com/spf13/cobra" + clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/put_command.go b/etcdctl/ctlv3/command/put_command.go index 50cfd8a20666..1d207bb8388c 100644 --- a/etcdctl/ctlv3/command/put_command.go +++ b/etcdctl/ctlv3/command/put_command.go @@ -20,6 +20,7 @@ import ( "strconv" "github.com/spf13/cobra" + clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/role_command.go b/etcdctl/ctlv3/command/role_command.go index c18f133bdf67..705d88d886fa 100644 --- a/etcdctl/ctlv3/command/role_command.go +++ b/etcdctl/ctlv3/command/role_command.go @@ -19,6 +19,7 @@ import ( "fmt" "github.com/spf13/cobra" + clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdctl/ctlv3/command/snapshot_command.go b/etcdctl/ctlv3/command/snapshot_command.go index 1e5f2685d945..df317e23cc78 100644 --- a/etcdctl/ctlv3/command/snapshot_command.go +++ b/etcdctl/ctlv3/command/snapshot_command.go @@ -19,10 +19,11 @@ import ( "fmt" "github.com/spf13/cobra" + "go.uber.org/zap" + "go.etcd.io/etcd/client/pkg/v3/logutil" snapshot "go.etcd.io/etcd/client/v3/snapshot" "go.etcd.io/etcd/pkg/v3/cobrautl" - "go.uber.org/zap" ) // NewSnapshotCommand returns the cobra command for "snapshot". diff --git a/etcdctl/ctlv3/command/user_command.go b/etcdctl/ctlv3/command/user_command.go index a905c73c7ba0..ee3f55a2a479 100644 --- a/etcdctl/ctlv3/command/user_command.go +++ b/etcdctl/ctlv3/command/user_command.go @@ -21,6 +21,7 @@ import ( "github.com/bgentry/speakeasy" "github.com/spf13/cobra" + clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/pkg/v3/cobrautl" ) diff --git a/etcdutl/ctl.go b/etcdutl/ctl.go index 967a7805a6fa..5bafe3399e31 100644 --- a/etcdutl/ctl.go +++ b/etcdutl/ctl.go @@ -17,6 +17,7 @@ package main import ( "github.com/spf13/cobra" + "go.etcd.io/etcd/etcdutl/v3/etcdutl" ) diff --git a/etcdutl/etcdutl/backup_command.go b/etcdutl/etcdutl/backup_command.go index e2ed57ef40c1..d7405c3e5142 100644 --- a/etcdutl/etcdutl/backup_command.go +++ b/etcdutl/etcdutl/backup_command.go @@ -21,6 +21,7 @@ import ( "time" "github.com/spf13/cobra" + "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/client/pkg/v3/fileutil" "go.etcd.io/etcd/client/pkg/v3/types" @@ -37,8 +38,9 @@ import ( "go.etcd.io/etcd/server/v3/verify" "go.etcd.io/raft/v3/raftpb" - bolt "go.etcd.io/bbolt" "go.uber.org/zap" + + bolt "go.etcd.io/bbolt" ) var ( diff --git a/etcdutl/etcdutl/common.go b/etcdutl/etcdutl/common.go index 281058bc24e9..d54827d0457f 100644 --- a/etcdutl/etcdutl/common.go +++ b/etcdutl/etcdutl/common.go @@ -15,10 +15,11 @@ package etcdutl import ( - "go.etcd.io/etcd/client/pkg/v3/logutil" - "go.etcd.io/etcd/pkg/v3/cobrautl" "go.uber.org/zap" "go.uber.org/zap/zapcore" + + "go.etcd.io/etcd/client/pkg/v3/logutil" + "go.etcd.io/etcd/pkg/v3/cobrautl" ) func GetLogger() *zap.Logger { diff --git a/etcdutl/etcdutl/defrag_command.go b/etcdutl/etcdutl/defrag_command.go index bc447d4ada8f..d8077ae8bfb2 100644 --- a/etcdutl/etcdutl/defrag_command.go +++ b/etcdutl/etcdutl/defrag_command.go @@ -20,6 +20,7 @@ import ( "time" "github.com/spf13/cobra" + "go.etcd.io/etcd/pkg/v3/cobrautl" "go.etcd.io/etcd/server/v3/storage/backend" "go.etcd.io/etcd/server/v3/storage/datadir" diff --git a/etcdutl/etcdutl/printer.go b/etcdutl/etcdutl/printer.go index 1af5a875f439..7d65366065ff 100644 --- a/etcdutl/etcdutl/printer.go +++ b/etcdutl/etcdutl/printer.go @@ -19,6 +19,7 @@ import ( "fmt" "github.com/spf13/cobra" + "go.etcd.io/etcd/etcdutl/v3/snapshot" "go.etcd.io/etcd/pkg/v3/cobrautl" diff --git a/etcdutl/snapshot/v3_snapshot.go b/etcdutl/snapshot/v3_snapshot.go index 598408361103..8958ba80da13 100644 --- a/etcdutl/snapshot/v3_snapshot.go +++ b/etcdutl/snapshot/v3_snapshot.go @@ -26,6 +26,8 @@ import ( "reflect" "strings" + "go.uber.org/zap" + bolt "go.etcd.io/bbolt" "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/client/pkg/v3/fileutil" @@ -45,7 +47,6 @@ import ( "go.etcd.io/etcd/server/v3/verify" "go.etcd.io/raft/v3" "go.etcd.io/raft/v3/raftpb" - "go.uber.org/zap" ) // Manager defines snapshot methods. diff --git a/server/auth/range_perm_cache.go b/server/auth/range_perm_cache.go index 4c94a6b46148..0d639c413a61 100644 --- a/server/auth/range_perm_cache.go +++ b/server/auth/range_perm_cache.go @@ -15,9 +15,10 @@ package auth import ( + "go.uber.org/zap" + "go.etcd.io/etcd/api/v3/authpb" "go.etcd.io/etcd/pkg/v3/adt" - "go.uber.org/zap" ) func getMergedPerms(tx AuthReadTx, userName string) *unifiedRangePermissions { diff --git a/server/config/config.go b/server/config/config.go index 613eefb4807e..67244b82cffc 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -22,15 +22,17 @@ import ( "strings" "time" + "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" + "go.etcd.io/etcd/client/pkg/v3/transport" "go.etcd.io/etcd/client/pkg/v3/types" "go.etcd.io/etcd/pkg/v3/netutil" "go.etcd.io/etcd/server/v3/etcdserver/api/v3discovery" "go.etcd.io/etcd/server/v3/storage/datadir" - "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" - bolt "go.etcd.io/bbolt" "go.uber.org/zap" + + bolt "go.etcd.io/bbolt" ) // ServerConfig holds the configuration of etcd as taken from the command line or discovery. diff --git a/server/embed/config.go b/server/embed/config.go index fc192519dcb8..a0824fcf5a18 100644 --- a/server/embed/config.go +++ b/server/embed/config.go @@ -41,12 +41,13 @@ import ( "go.etcd.io/etcd/server/v3/etcdserver/api/v3compactor" "go.etcd.io/etcd/server/v3/etcdserver/api/v3discovery" - bolt "go.etcd.io/bbolt" "go.uber.org/multierr" "go.uber.org/zap" "golang.org/x/crypto/bcrypt" "google.golang.org/grpc" "sigs.k8s.io/yaml" + + bolt "go.etcd.io/bbolt" ) const ( diff --git a/server/embed/config_logging.go b/server/embed/config_logging.go index 6195d54ffc53..900519544bb7 100644 --- a/server/embed/config_logging.go +++ b/server/embed/config_logging.go @@ -23,13 +23,14 @@ import ( "net/url" "os" - "go.etcd.io/etcd/client/pkg/v3/logutil" "go.uber.org/zap" "go.uber.org/zap/zapcore" "go.uber.org/zap/zapgrpc" "google.golang.org/grpc" "google.golang.org/grpc/grpclog" "gopkg.in/natefinch/lumberjack.v2" + + "go.etcd.io/etcd/client/pkg/v3/logutil" ) // GetLogger returns the logger. diff --git a/server/etcdmain/etcd.go b/server/etcdmain/etcd.go index 5906cdc4614b..e58a3157338f 100644 --- a/server/etcdmain/etcd.go +++ b/server/etcdmain/etcd.go @@ -21,6 +21,9 @@ import ( "strings" "time" + "go.uber.org/zap" + "google.golang.org/grpc" + "go.etcd.io/etcd/client/pkg/v3/fileutil" "go.etcd.io/etcd/client/pkg/v3/logutil" "go.etcd.io/etcd/client/pkg/v3/types" @@ -28,8 +31,6 @@ import ( "go.etcd.io/etcd/server/v3/embed" "go.etcd.io/etcd/server/v3/etcdserver/api/v2discovery" "go.etcd.io/etcd/server/v3/etcdserver/errors" - "go.uber.org/zap" - "google.golang.org/grpc" ) type dirType string diff --git a/server/etcdmain/help.go b/server/etcdmain/help.go index fced0130c677..baef00951546 100644 --- a/server/etcdmain/help.go +++ b/server/etcdmain/help.go @@ -19,9 +19,10 @@ import ( "fmt" "strconv" + "golang.org/x/crypto/bcrypt" + cconfig "go.etcd.io/etcd/server/v3/config" "go.etcd.io/etcd/server/v3/embed" - "golang.org/x/crypto/bcrypt" ) var ( diff --git a/server/etcdserver/api/capability.go b/server/etcdserver/api/capability.go index 9c243294e3fe..8546eeb543ac 100644 --- a/server/etcdserver/api/capability.go +++ b/server/etcdserver/api/capability.go @@ -17,9 +17,10 @@ package api import ( "sync" + "go.uber.org/zap" + "go.etcd.io/etcd/api/v3/version" serverversion "go.etcd.io/etcd/server/v3/etcdserver/version" - "go.uber.org/zap" "github.com/coreos/go-semver/semver" ) diff --git a/server/etcdserver/api/etcdhttp/health.go b/server/etcdserver/api/etcdhttp/health.go index 6e4f1e70e3a0..95950de8961a 100644 --- a/server/etcdserver/api/etcdhttp/health.go +++ b/server/etcdserver/api/etcdhttp/health.go @@ -21,13 +21,14 @@ import ( "net/http" "github.com/prometheus/client_golang/prometheus" + "go.uber.org/zap" + "go.etcd.io/etcd/api/v3/etcdserverpb" pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/client/pkg/v3/types" "go.etcd.io/etcd/server/v3/auth" "go.etcd.io/etcd/server/v3/config" "go.etcd.io/raft/v3" - "go.uber.org/zap" ) const ( diff --git a/server/etcdserver/api/etcdhttp/utils.go b/server/etcdserver/api/etcdhttp/utils.go index 055e03da8976..268400d76407 100644 --- a/server/etcdserver/api/etcdhttp/utils.go +++ b/server/etcdserver/api/etcdhttp/utils.go @@ -17,10 +17,11 @@ package etcdhttp import ( "net/http" + "go.uber.org/zap" + httptypes "go.etcd.io/etcd/server/v3/etcdserver/api/etcdhttp/types" "go.etcd.io/etcd/server/v3/etcdserver/api/v2error" "go.etcd.io/etcd/server/v3/etcdserver/errors" - "go.uber.org/zap" ) func allowMethod(w http.ResponseWriter, r *http.Request, m string) bool { diff --git a/server/etcdserver/api/v3rpc/interceptor.go b/server/etcdserver/api/v3rpc/interceptor.go index 2ef5bba91b9c..c7d1c6bdcdf1 100644 --- a/server/etcdserver/api/v3rpc/interceptor.go +++ b/server/etcdserver/api/v3rpc/interceptor.go @@ -26,11 +26,12 @@ import ( "go.etcd.io/etcd/server/v3/etcdserver/api" "go.etcd.io/raft/v3" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.uber.org/zap" "google.golang.org/grpc" "google.golang.org/grpc/metadata" "google.golang.org/grpc/peer" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" ) const ( diff --git a/server/etcdserver/api/v3rpc/maintenance.go b/server/etcdserver/api/v3rpc/maintenance.go index 7ed449a6f3bc..3fcae8d7d62a 100644 --- a/server/etcdserver/api/v3rpc/maintenance.go +++ b/server/etcdserver/api/v3rpc/maintenance.go @@ -21,6 +21,7 @@ import ( "time" "github.com/dustin/go-humanize" + pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.etcd.io/etcd/api/v3/version" diff --git a/server/etcdserver/apply/apply.go b/server/etcdserver/apply/apply.go index 927bad4ddee7..058870b1dc2e 100644 --- a/server/etcdserver/apply/apply.go +++ b/server/etcdserver/apply/apply.go @@ -17,6 +17,8 @@ package apply import ( "context" + "go.uber.org/zap" + pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/membershippb" "go.etcd.io/etcd/client/pkg/v3/types" @@ -33,7 +35,6 @@ import ( serverstorage "go.etcd.io/etcd/server/v3/storage" "go.etcd.io/etcd/server/v3/storage/backend" "go.etcd.io/etcd/server/v3/storage/mvcc" - "go.uber.org/zap" "github.com/coreos/go-semver/semver" "github.com/gogo/protobuf/proto" diff --git a/server/etcdserver/apply/uber_applier.go b/server/etcdserver/apply/uber_applier.go index 50f8ba4b15eb..201defa385bc 100644 --- a/server/etcdserver/apply/uber_applier.go +++ b/server/etcdserver/apply/uber_applier.go @@ -18,6 +18,8 @@ import ( "context" "time" + "go.uber.org/zap" + pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/server/v3/auth" "go.etcd.io/etcd/server/v3/etcdserver/api/membership" @@ -27,7 +29,6 @@ import ( "go.etcd.io/etcd/server/v3/lease" "go.etcd.io/etcd/server/v3/storage/backend" "go.etcd.io/etcd/server/v3/storage/mvcc" - "go.uber.org/zap" ) type UberApplier interface { diff --git a/server/etcdserver/apply_v2.go b/server/etcdserver/apply_v2.go index c83c62193048..c9e4c3e87b07 100644 --- a/server/etcdserver/apply_v2.go +++ b/server/etcdserver/apply_v2.go @@ -22,6 +22,7 @@ import ( "unicode/utf8" "github.com/coreos/go-semver/semver" + "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/server/v3/etcdserver/api" "go.etcd.io/etcd/server/v3/etcdserver/api/membership" diff --git a/server/etcdserver/bootstrap.go b/server/etcdserver/bootstrap.go index 03764d028df4..1587e33219f4 100644 --- a/server/etcdserver/bootstrap.go +++ b/server/etcdserver/bootstrap.go @@ -25,9 +25,10 @@ import ( "github.com/coreos/go-semver/semver" "github.com/dustin/go-humanize" - "go.etcd.io/etcd/server/v3/etcdserver/errors" "go.uber.org/zap" + "go.etcd.io/etcd/server/v3/etcdserver/errors" + "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/client/pkg/v3/fileutil" "go.etcd.io/etcd/client/pkg/v3/types" diff --git a/server/etcdserver/raft.go b/server/etcdserver/raft.go index 9496c1b730c2..d111081be44f 100644 --- a/server/etcdserver/raft.go +++ b/server/etcdserver/raft.go @@ -21,13 +21,14 @@ import ( "sync" "time" + "go.uber.org/zap" + "go.etcd.io/etcd/client/pkg/v3/logutil" "go.etcd.io/etcd/pkg/v3/contention" "go.etcd.io/etcd/server/v3/etcdserver/api/rafthttp" serverstorage "go.etcd.io/etcd/server/v3/storage" "go.etcd.io/raft/v3" "go.etcd.io/raft/v3/raftpb" - "go.uber.org/zap" ) const ( diff --git a/server/etcdserver/server.go b/server/etcdserver/server.go index aee081a0cfd0..ba19ea3acdf1 100644 --- a/server/etcdserver/server.go +++ b/server/etcdserver/server.go @@ -32,12 +32,13 @@ import ( "github.com/coreos/go-semver/semver" humanize "github.com/dustin/go-humanize" "github.com/prometheus/client_golang/prometheus" + "go.uber.org/zap" + "go.etcd.io/etcd/pkg/v3/notify" "go.etcd.io/etcd/pkg/v3/runtime" "go.etcd.io/etcd/server/v3/config" "go.etcd.io/etcd/server/v3/etcdserver/apply" "go.etcd.io/etcd/server/v3/etcdserver/errors" - "go.uber.org/zap" pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/membershippb" diff --git a/server/etcdserver/txn/txn.go b/server/etcdserver/txn/txn.go index f4031d7cca70..ecd554629c30 100644 --- a/server/etcdserver/txn/txn.go +++ b/server/etcdserver/txn/txn.go @@ -20,6 +20,8 @@ import ( "fmt" "sort" + "go.uber.org/zap" + pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/mvccpb" "go.etcd.io/etcd/pkg/v3/traceutil" @@ -27,7 +29,6 @@ import ( "go.etcd.io/etcd/server/v3/etcdserver/errors" "go.etcd.io/etcd/server/v3/lease" "go.etcd.io/etcd/server/v3/storage/mvcc" - "go.uber.org/zap" ) func Put(ctx context.Context, lg *zap.Logger, lessor lease.Lessor, kv mvcc.KV, txnWrite mvcc.TxnWrite, p *pb.PutRequest) (resp *pb.PutResponse, trace *traceutil.Trace, err error) { diff --git a/server/etcdserver/txn/util.go b/server/etcdserver/txn/util.go index ec75744dc5de..a4a3168ffe55 100644 --- a/server/etcdserver/txn/util.go +++ b/server/etcdserver/txn/util.go @@ -21,6 +21,7 @@ import ( "time" "github.com/golang/protobuf/proto" + pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.uber.org/zap" diff --git a/server/etcdserver/version/downgrade.go b/server/etcdserver/version/downgrade.go index 60cab4931dac..efad367058b7 100644 --- a/server/etcdserver/version/downgrade.go +++ b/server/etcdserver/version/downgrade.go @@ -16,8 +16,9 @@ package version import ( "github.com/coreos/go-semver/semver" - "go.etcd.io/etcd/api/v3/version" "go.uber.org/zap" + + "go.etcd.io/etcd/api/v3/version" ) type DowngradeInfo struct { diff --git a/server/etcdserver/version/monitor.go b/server/etcdserver/version/monitor.go index 8cfb916a73cb..7ecc19709e77 100644 --- a/server/etcdserver/version/monitor.go +++ b/server/etcdserver/version/monitor.go @@ -19,8 +19,9 @@ import ( "errors" "github.com/coreos/go-semver/semver" - "go.etcd.io/etcd/api/v3/version" "go.uber.org/zap" + + "go.etcd.io/etcd/api/v3/version" ) // Monitor contains logic used by cluster leader to monitor version changes and decide on cluster version or downgrade progress. diff --git a/server/lease/lessor.go b/server/lease/lessor.go index 0dd8f9e6df89..a2e3dab24f17 100644 --- a/server/lease/lessor.go +++ b/server/lease/lessor.go @@ -24,12 +24,13 @@ import ( "time" "github.com/coreos/go-semver/semver" + "go.uber.org/zap" + pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/version" "go.etcd.io/etcd/server/v3/lease/leasepb" "go.etcd.io/etcd/server/v3/storage/backend" "go.etcd.io/etcd/server/v3/storage/schema" - "go.uber.org/zap" ) // NoLease is a special LeaseID representing the absence of a lease. diff --git a/server/mock/mockstorage/storage_recorder.go b/server/mock/mockstorage/storage_recorder.go index 16f44e1b0eba..41d2952e8a12 100644 --- a/server/mock/mockstorage/storage_recorder.go +++ b/server/mock/mockstorage/storage_recorder.go @@ -16,6 +16,7 @@ package mockstorage import ( "github.com/coreos/go-semver/semver" + "go.etcd.io/etcd/client/pkg/v3/testutil" "go.etcd.io/raft/v3" "go.etcd.io/raft/v3/raftpb" diff --git a/server/proxy/grpcproxy/adapter/watch_client_adapter.go b/server/proxy/grpcproxy/adapter/watch_client_adapter.go index fbc09f6ff641..2a93e29e01c8 100644 --- a/server/proxy/grpcproxy/adapter/watch_client_adapter.go +++ b/server/proxy/grpcproxy/adapter/watch_client_adapter.go @@ -18,8 +18,9 @@ import ( "context" "errors" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" "google.golang.org/grpc" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" ) var errAlreadySentHeader = errors.New("adapter: already sent header") diff --git a/server/proxy/grpcproxy/cache/store.go b/server/proxy/grpcproxy/cache/store.go index 2c189644a865..69fb38c070f0 100644 --- a/server/proxy/grpcproxy/cache/store.go +++ b/server/proxy/grpcproxy/cache/store.go @@ -21,6 +21,7 @@ import ( "sync" "github.com/golang/groupcache/lru" + pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" "go.etcd.io/etcd/pkg/v3/adt" diff --git a/server/proxy/grpcproxy/cluster.go b/server/proxy/grpcproxy/cluster.go index 6cf93e22b199..2467277129e6 100644 --- a/server/proxy/grpcproxy/cluster.go +++ b/server/proxy/grpcproxy/cluster.go @@ -21,10 +21,11 @@ import ( "os" "sync" + "golang.org/x/time/rate" + pb "go.etcd.io/etcd/api/v3/etcdserverpb" clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/client/v3/naming/endpoints" - "golang.org/x/time/rate" "go.uber.org/zap" ) diff --git a/server/proxy/grpcproxy/health.go b/server/proxy/grpcproxy/health.go index 2ed3ac23550a..ec9781bfe278 100644 --- a/server/proxy/grpcproxy/health.go +++ b/server/proxy/grpcproxy/health.go @@ -20,10 +20,11 @@ import ( "net/http" "time" + "go.uber.org/zap" + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/server/v3/etcdserver/api/etcdhttp" - "go.uber.org/zap" ) // HandleHealth registers health handler on '/health'. diff --git a/server/proxy/grpcproxy/metrics.go b/server/proxy/grpcproxy/metrics.go index d2a62f31832d..cc94b7f6e9f3 100644 --- a/server/proxy/grpcproxy/metrics.go +++ b/server/proxy/grpcproxy/metrics.go @@ -24,6 +24,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" + "go.etcd.io/etcd/server/v3/etcdserver/api/etcdhttp" ) diff --git a/server/proxy/grpcproxy/watch.go b/server/proxy/grpcproxy/watch.go index 478e0a6e8dc9..90eb21d4a40f 100644 --- a/server/proxy/grpcproxy/watch.go +++ b/server/proxy/grpcproxy/watch.go @@ -18,14 +18,15 @@ import ( "context" "sync" - pb "go.etcd.io/etcd/api/v3/etcdserverpb" - "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" - clientv3 "go.etcd.io/etcd/client/v3" - "go.etcd.io/etcd/server/v3/etcdserver/api/v3rpc" "go.uber.org/zap" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + + pb "go.etcd.io/etcd/api/v3/etcdserverpb" + "go.etcd.io/etcd/api/v3/v3rpc/rpctypes" + clientv3 "go.etcd.io/etcd/client/v3" + "go.etcd.io/etcd/server/v3/etcdserver/api/v3rpc" ) type watchProxy struct { diff --git a/server/storage/backend/backend.go b/server/storage/backend/backend.go index beaaefe2439a..e7b951ee7e6b 100644 --- a/server/storage/backend/backend.go +++ b/server/storage/backend/backend.go @@ -25,8 +25,9 @@ import ( "time" humanize "github.com/dustin/go-humanize" - bolt "go.etcd.io/bbolt" "go.uber.org/zap" + + bolt "go.etcd.io/bbolt" ) var ( diff --git a/server/storage/backend/batch_tx.go b/server/storage/backend/batch_tx.go index c837dc305785..0d12a0868ddc 100644 --- a/server/storage/backend/batch_tx.go +++ b/server/storage/backend/batch_tx.go @@ -21,8 +21,9 @@ import ( "sync/atomic" "time" - bolt "go.etcd.io/bbolt" "go.uber.org/zap" + + bolt "go.etcd.io/bbolt" ) type BucketID int diff --git a/server/storage/backend/testing/betesting.go b/server/storage/backend/testing/betesting.go index 05e0249b2413..e42908f9365d 100644 --- a/server/storage/backend/testing/betesting.go +++ b/server/storage/backend/testing/betesting.go @@ -21,8 +21,9 @@ import ( "time" "github.com/stretchr/testify/assert" - "go.etcd.io/etcd/server/v3/storage/backend" "go.uber.org/zap/zaptest" + + "go.etcd.io/etcd/server/v3/storage/backend" ) func NewTmpBackendFromCfg(t testing.TB, bcfg backend.BackendConfig) (backend.Backend, string) { diff --git a/server/storage/backend/verify.go b/server/storage/backend/verify.go index 729e90eff6f4..c55279f81610 100644 --- a/server/storage/backend/verify.go +++ b/server/storage/backend/verify.go @@ -18,8 +18,9 @@ import ( "runtime/debug" "strings" - "go.etcd.io/etcd/client/pkg/v3/verify" "go.uber.org/zap" + + "go.etcd.io/etcd/client/pkg/v3/verify" ) const ( diff --git a/server/storage/mvcc/hash.go b/server/storage/mvcc/hash.go index 3d30aa42e5f5..0c8e92240ca0 100644 --- a/server/storage/mvcc/hash.go +++ b/server/storage/mvcc/hash.go @@ -20,9 +20,10 @@ import ( "sort" "sync" + "go.uber.org/zap" + "go.etcd.io/etcd/server/v3/storage/backend" "go.etcd.io/etcd/server/v3/storage/schema" - "go.uber.org/zap" ) const ( diff --git a/server/storage/mvcc/kvstore_compaction.go b/server/storage/mvcc/kvstore_compaction.go index f769d598fca5..65cbcd7409b6 100644 --- a/server/storage/mvcc/kvstore_compaction.go +++ b/server/storage/mvcc/kvstore_compaction.go @@ -19,8 +19,9 @@ import ( "fmt" "time" - "go.etcd.io/etcd/server/v3/storage/schema" "go.uber.org/zap" + + "go.etcd.io/etcd/server/v3/storage/schema" ) func (s *store) scheduleCompaction(compactMainRev, prevCompactRev int64) (KeyValueHash, error) { diff --git a/server/storage/mvcc/kvstore_txn.go b/server/storage/mvcc/kvstore_txn.go index 6262c94d7ebf..b93fcbe64da1 100644 --- a/server/storage/mvcc/kvstore_txn.go +++ b/server/storage/mvcc/kvstore_txn.go @@ -18,12 +18,13 @@ import ( "context" "fmt" + "go.uber.org/zap" + "go.etcd.io/etcd/api/v3/mvccpb" "go.etcd.io/etcd/pkg/v3/traceutil" "go.etcd.io/etcd/server/v3/lease" "go.etcd.io/etcd/server/v3/storage/backend" "go.etcd.io/etcd/server/v3/storage/schema" - "go.uber.org/zap" ) type storeTxnRead struct { diff --git a/server/storage/mvcc/testutil/hash.go b/server/storage/mvcc/testutil/hash.go index 24beb2869d33..e9d43b2046cc 100644 --- a/server/storage/mvcc/testutil/hash.go +++ b/server/storage/mvcc/testutil/hash.go @@ -22,6 +22,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "go.etcd.io/bbolt" "go.etcd.io/etcd/api/v3/mvccpb" ) diff --git a/server/storage/schema/actions.go b/server/storage/schema/actions.go index 20c8f1193aa5..fb1615605026 100644 --- a/server/storage/schema/actions.go +++ b/server/storage/schema/actions.go @@ -15,8 +15,9 @@ package schema import ( - "go.etcd.io/etcd/server/v3/storage/backend" "go.uber.org/zap" + + "go.etcd.io/etcd/server/v3/storage/backend" ) type action interface { diff --git a/server/storage/schema/alarm.go b/server/storage/schema/alarm.go index 1a8143c0f8a5..f1d80b27a6bc 100644 --- a/server/storage/schema/alarm.go +++ b/server/storage/schema/alarm.go @@ -15,9 +15,10 @@ package schema import ( + "go.uber.org/zap" + "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/server/v3/storage/backend" - "go.uber.org/zap" ) type alarmBackend struct { diff --git a/server/storage/schema/auth_roles.go b/server/storage/schema/auth_roles.go index dfda7ce5b7bc..e0fea6d4f3f7 100644 --- a/server/storage/schema/auth_roles.go +++ b/server/storage/schema/auth_roles.go @@ -15,9 +15,10 @@ package schema import ( + "go.uber.org/zap" + "go.etcd.io/etcd/api/v3/authpb" "go.etcd.io/etcd/server/v3/storage/backend" - "go.uber.org/zap" ) func UnsafeCreateAuthRolesBucket(tx backend.BatchTx) { diff --git a/server/storage/schema/auth_users.go b/server/storage/schema/auth_users.go index 2f7229e3d1fc..762eaf301795 100644 --- a/server/storage/schema/auth_users.go +++ b/server/storage/schema/auth_users.go @@ -15,8 +15,9 @@ package schema import ( - "go.etcd.io/etcd/api/v3/authpb" "go.uber.org/zap" + + "go.etcd.io/etcd/api/v3/authpb" ) func (abe *authBackend) GetUser(username string) *authpb.User { diff --git a/server/storage/schema/confstate.go b/server/storage/schema/confstate.go index 21752b79337a..ead2e527d685 100644 --- a/server/storage/schema/confstate.go +++ b/server/storage/schema/confstate.go @@ -18,9 +18,10 @@ import ( "encoding/json" "log" + "go.uber.org/zap" + "go.etcd.io/etcd/server/v3/storage/backend" "go.etcd.io/raft/v3/raftpb" - "go.uber.org/zap" ) // MustUnsafeSaveConfStateToBackend persists confState using given transaction (tx). diff --git a/server/storage/schema/migration.go b/server/storage/schema/migration.go index df902a2f0036..08062834a682 100644 --- a/server/storage/schema/migration.go +++ b/server/storage/schema/migration.go @@ -18,9 +18,10 @@ import ( "fmt" "github.com/coreos/go-semver/semver" + "go.uber.org/zap" + "go.etcd.io/etcd/api/v3/version" "go.etcd.io/etcd/server/v3/storage/backend" - "go.uber.org/zap" ) type migrationPlan []migrationStep diff --git a/server/storage/schema/schema.go b/server/storage/schema/schema.go index b0134cfe93f3..e2e7fe7e5667 100644 --- a/server/storage/schema/schema.go +++ b/server/storage/schema/schema.go @@ -18,9 +18,10 @@ import ( "fmt" "github.com/coreos/go-semver/semver" - "go.etcd.io/etcd/api/v3/version" "go.uber.org/zap" + "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/server/v3/storage/backend" ) diff --git a/server/storage/schema/version.go b/server/storage/schema/version.go index 341b386c4d70..18f566a993e9 100644 --- a/server/storage/schema/version.go +++ b/server/storage/schema/version.go @@ -16,6 +16,7 @@ package schema import ( "github.com/coreos/go-semver/semver" + "go.etcd.io/bbolt" "go.etcd.io/etcd/server/v3/storage/backend" ) diff --git a/server/storage/storage.go b/server/storage/storage.go index ea815722aac6..21542f9eee2b 100644 --- a/server/storage/storage.go +++ b/server/storage/storage.go @@ -18,11 +18,12 @@ import ( "sync" "github.com/coreos/go-semver/semver" + "go.uber.org/zap" + "go.etcd.io/etcd/server/v3/etcdserver/api/snap" "go.etcd.io/etcd/server/v3/storage/wal" "go.etcd.io/etcd/server/v3/storage/wal/walpb" "go.etcd.io/raft/v3/raftpb" - "go.uber.org/zap" ) type Storage interface { diff --git a/server/storage/wal/repair.go b/server/storage/wal/repair.go index 78083d45b36f..e81ac8dddf5f 100644 --- a/server/storage/wal/repair.go +++ b/server/storage/wal/repair.go @@ -20,9 +20,10 @@ import ( "path/filepath" "time" + "go.uber.org/zap" + "go.etcd.io/etcd/client/pkg/v3/fileutil" "go.etcd.io/etcd/server/v3/storage/wal/walpb" - "go.uber.org/zap" ) // Repair tries to repair ErrUnexpectedEOF in the diff --git a/server/storage/wal/testing/waltesting.go b/server/storage/wal/testing/waltesting.go index d936bf730a51..ba0930303638 100644 --- a/server/storage/wal/testing/waltesting.go +++ b/server/storage/wal/testing/waltesting.go @@ -19,12 +19,13 @@ import ( "path/filepath" "testing" + "go.uber.org/zap/zaptest" + "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/server/v3/storage/wal" "go.etcd.io/etcd/server/v3/storage/wal/walpb" "go.etcd.io/raft/v3/raftpb" - "go.uber.org/zap/zaptest" ) func NewTmpWAL(t testing.TB, reqs []etcdserverpb.InternalRaftRequest) (*wal.WAL, string) { diff --git a/server/storage/wal/version.go b/server/storage/wal/version.go index d2310726fbaf..5c90af18a803 100644 --- a/server/storage/wal/version.go +++ b/server/storage/wal/version.go @@ -20,10 +20,11 @@ import ( "github.com/coreos/go-semver/semver" "github.com/golang/protobuf/proto" - "go.etcd.io/etcd/api/v3/version" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/types/descriptorpb" + "go.etcd.io/etcd/api/v3/version" + "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/raft/v3/raftpb" diff --git a/server/verify/verify.go b/server/verify/verify.go index 2accdd21768b..9783be109275 100644 --- a/server/verify/verify.go +++ b/server/verify/verify.go @@ -17,6 +17,8 @@ package verify import ( "fmt" + "go.uber.org/zap" + "go.etcd.io/etcd/client/pkg/v3/verify" "go.etcd.io/etcd/server/v3/storage/backend" "go.etcd.io/etcd/server/v3/storage/datadir" @@ -24,7 +26,6 @@ import ( wal2 "go.etcd.io/etcd/server/v3/storage/wal" "go.etcd.io/etcd/server/v3/storage/wal/walpb" "go.etcd.io/raft/v3/raftpb" - "go.uber.org/zap" ) const ENV_VERIFY_VALUE_STORAGE_WAL verify.VerificationType = "storage_wal" diff --git a/tests/framework/integration/cluster.go b/tests/framework/integration/cluster.go index 35beb84abace..019d4f7c1030 100644 --- a/tests/framework/integration/cluster.go +++ b/tests/framework/integration/cluster.go @@ -34,6 +34,9 @@ import ( "testing" "time" + "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest" + pb "go.etcd.io/etcd/api/v3/etcdserverpb" "go.etcd.io/etcd/client/pkg/v3/testutil" "go.etcd.io/etcd/client/pkg/v3/tlsutil" @@ -57,8 +60,6 @@ import ( framecfg "go.etcd.io/etcd/tests/v3/framework/config" "go.etcd.io/etcd/tests/v3/framework/testutils" "go.etcd.io/raft/v3" - "go.uber.org/zap/zapcore" - "go.uber.org/zap/zaptest" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" diff --git a/tests/framework/integration/testing.go b/tests/framework/integration/testing.go index e6d3e9016a95..7a4613a8ac28 100644 --- a/tests/framework/integration/testing.go +++ b/tests/framework/integration/testing.go @@ -19,13 +19,14 @@ import ( "testing" grpc_logsettable "github.com/grpc-ecosystem/go-grpc-middleware/logging/settable" + "go.uber.org/zap/zapcore" + "go.uber.org/zap/zapgrpc" + "go.uber.org/zap/zaptest" + "go.etcd.io/etcd/client/pkg/v3/testutil" "go.etcd.io/etcd/client/pkg/v3/verify" clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/server/v3/embed" - "go.uber.org/zap/zapcore" - "go.uber.org/zap/zapgrpc" - "go.uber.org/zap/zaptest" ) var grpc_logger grpc_logsettable.SettableLoggerV2 diff --git a/tests/functional/cmd/etcd-agent/main.go b/tests/functional/cmd/etcd-agent/main.go index 2ff1b04f45ee..64aaa26b2394 100644 --- a/tests/functional/cmd/etcd-agent/main.go +++ b/tests/functional/cmd/etcd-agent/main.go @@ -18,9 +18,10 @@ package main import ( "flag" - "go.etcd.io/etcd/tests/v3/functional/agent" "go.uber.org/zap/zapcore" + "go.etcd.io/etcd/tests/v3/functional/agent" + "go.uber.org/zap" ) diff --git a/tests/integration/clientv3/util.go b/tests/integration/clientv3/util.go index 63b377e3108c..67d1fd59cc91 100644 --- a/tests/integration/clientv3/util.go +++ b/tests/integration/clientv3/util.go @@ -21,10 +21,11 @@ import ( "testing" "time" - clientv3 "go.etcd.io/etcd/client/v3" - integration2 "go.etcd.io/etcd/tests/v3/framework/integration" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + + clientv3 "go.etcd.io/etcd/client/v3" + integration2 "go.etcd.io/etcd/tests/v3/framework/integration" ) // MustWaitPinReady waits up to 3-second until connection is up (pin endpoint). diff --git a/tests/linearizability/client.go b/tests/linearizability/client.go index 20f3abc9a8a9..b5a65df78301 100644 --- a/tests/linearizability/client.go +++ b/tests/linearizability/client.go @@ -18,9 +18,10 @@ import ( "context" "time" + "go.uber.org/zap" + "go.etcd.io/etcd/api/v3/mvccpb" clientv3 "go.etcd.io/etcd/client/v3" - "go.uber.org/zap" ) type recordingClient struct { diff --git a/tests/linearizability/history.go b/tests/linearizability/history.go index 0dfb0d394efb..52981167d1d6 100644 --- a/tests/linearizability/history.go +++ b/tests/linearizability/history.go @@ -18,6 +18,7 @@ import ( "time" "github.com/anishathalye/porcupine" + clientv3 "go.etcd.io/etcd/client/v3" ) diff --git a/tests/linearizability/traffic.go b/tests/linearizability/traffic.go index 590511e48cb4..8cce9a1b33dd 100644 --- a/tests/linearizability/traffic.go +++ b/tests/linearizability/traffic.go @@ -20,8 +20,9 @@ import ( "math/rand" "time" - "go.etcd.io/etcd/api/v3/mvccpb" "golang.org/x/time/rate" + + "go.etcd.io/etcd/api/v3/mvccpb" ) var (