Skip to content

Commit

Permalink
Fix goimports in all existing files. Execution of ./scripts/fix.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Piotr Tabor <[email protected]>
  • Loading branch information
ptabor committed Dec 29, 2022
1 parent 5a28a02 commit 9e1abba
Show file tree
Hide file tree
Showing 94 changed files with 181 additions and 88 deletions.
3 changes: 2 additions & 1 deletion client/pkg/fileutil/fileutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
1 change: 1 addition & 0 deletions client/pkg/testutil/before.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"

"go.etcd.io/etcd/client/pkg/v3/verify"
)

Expand Down
3 changes: 2 additions & 1 deletion client/v2/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 2 additions & 1 deletion client/v3/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
11 changes: 6 additions & 5 deletions client/v3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@ 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"
grpccredentials "google.golang.org/grpc/credentials"
"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 (
Expand Down
3 changes: 2 additions & 1 deletion client/v3/concurrency/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion client/v3/credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion client/v3/ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion client/v3/internal/resolver/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 2 additions & 1 deletion client/v3/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 2 additions & 1 deletion client/v3/maintenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
3 changes: 2 additions & 1 deletion client/v3/retry_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion client/v3/snapshot/v3_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 4 additions & 3 deletions client/v3/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/alarm_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"fmt"

"github.com/spf13/cobra"

v3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/cobrautl"
)
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/auth_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/compaction_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"strconv"

"github.com/spf13/cobra"

clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/cobrautl"
)
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/defrag_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"time"

"github.com/spf13/cobra"

"go.etcd.io/etcd/pkg/v3/cobrautl"
)

Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/del_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"time"

"github.com/spf13/cobra"

clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/cobrautl"
)
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/downgrade_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"errors"

"github.com/spf13/cobra"

clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/cobrautl"
)
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/get_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"strings"

"github.com/spf13/cobra"

clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/cobrautl"
)
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/global.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/make_mirror_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"time"

"github.com/bgentry/speakeasy"

"go.etcd.io/etcd/pkg/v3/cobrautl"

"go.etcd.io/etcd/api/v3/mvccpb"
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/member_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"strings"

"github.com/spf13/cobra"

clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/cobrautl"
)
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/move_leader_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"strconv"

"github.com/spf13/cobra"

clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/cobrautl"
)
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/put_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"strconv"

"github.com/spf13/cobra"

clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/cobrautl"
)
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/role_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"

"github.com/spf13/cobra"

clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/v3/cobrautl"
)
Expand Down
3 changes: 2 additions & 1 deletion etcdctl/ctlv3/command/snapshot_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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".
Expand Down
1 change: 1 addition & 0 deletions etcdctl/ctlv3/command/user_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
1 change: 1 addition & 0 deletions etcdutl/ctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package main

import (
"github.com/spf13/cobra"

"go.etcd.io/etcd/etcdutl/v3/etcdutl"
)

Expand Down
3 changes: 2 additions & 1 deletion etcdutl/etcdutl/backup_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import (
"time"

"github.com/spf13/cobra"
"go.uber.org/zap"

"go.etcd.io/etcd/api/v3/etcdserverpb"
"go.etcd.io/etcd/client/pkg/v3/fileutil"
"go.etcd.io/etcd/client/pkg/v3/types"
Expand All @@ -38,7 +40,6 @@ import (
"go.etcd.io/raft/v3/raftpb"

bolt "go.etcd.io/bbolt"
"go.uber.org/zap"
)

var (
Expand Down
5 changes: 3 additions & 2 deletions etcdutl/etcdutl/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions etcdutl/etcdutl/defrag_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions etcdutl/etcdutl/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"

"github.com/spf13/cobra"

"go.etcd.io/etcd/etcdutl/v3/snapshot"
"go.etcd.io/etcd/pkg/v3/cobrautl"

Expand Down
3 changes: 2 additions & 1 deletion etcdutl/snapshot/v3_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down
Loading

0 comments on commit 9e1abba

Please sign in to comment.