Skip to content

Commit

Permalink
Fix import paths to include v3 for etcd
Browse files Browse the repository at this point in the history
The module name is go.etcd.io/etcd/v3, but many places were importing
go.etcd.io/etcd which (to the best of my understanding) was the root
cause for vendoring the latter and causing build problems.

`./scripts/updatedep.sh` is a noop as of this commit.:x
  • Loading branch information
tbg committed May 31, 2019
1 parent 6aad9b4 commit 0ffee56
Show file tree
Hide file tree
Showing 536 changed files with 1,371 additions and 1,633 deletions.
7 changes: 3 additions & 4 deletions auth/range_perm_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
package auth

import (
"go.etcd.io/etcd/auth/authpb"
"go.etcd.io/etcd/mvcc/backend"
"go.etcd.io/etcd/pkg/adt"

"go.etcd.io/etcd/v3/auth/authpb"
"go.etcd.io/etcd/v3/mvcc/backend"
"go.etcd.io/etcd/v3/pkg/adt"
"go.uber.org/zap"
)

Expand Down
5 changes: 2 additions & 3 deletions auth/range_perm_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ package auth
import (
"testing"

"go.etcd.io/etcd/auth/authpb"
"go.etcd.io/etcd/pkg/adt"

"go.etcd.io/etcd/v3/auth/authpb"
"go.etcd.io/etcd/v3/pkg/adt"
"go.uber.org/zap"
)

Expand Down
9 changes: 4 additions & 5 deletions auth/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ import (
"sync"
"sync/atomic"

"go.etcd.io/etcd/auth/authpb"
"go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes"
pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
"go.etcd.io/etcd/mvcc/backend"

"github.com/coreos/pkg/capnslog"
"go.etcd.io/etcd/v3/auth/authpb"
"go.etcd.io/etcd/v3/etcdserver/api/v3rpc/rpctypes"
pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
"go.etcd.io/etcd/v3/mvcc/backend"
"go.uber.org/zap"
"golang.org/x/crypto/bcrypt"
"google.golang.org/grpc/credentials"
Expand Down
9 changes: 4 additions & 5 deletions auth/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ import (
"testing"
"time"

"go.etcd.io/etcd/auth/authpb"
"go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes"
pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
"go.etcd.io/etcd/mvcc/backend"

"go.etcd.io/etcd/v3/auth/authpb"
"go.etcd.io/etcd/v3/etcdserver/api/v3rpc/rpctypes"
pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
"go.etcd.io/etcd/v3/mvcc/backend"
"go.uber.org/zap"
"golang.org/x/crypto/bcrypt"
"google.golang.org/grpc/metadata"
Expand Down
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"sync"
"time"

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

var (
Expand Down
4 changes: 2 additions & 2 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"testing"
"time"

"go.etcd.io/etcd/pkg/testutil"
"go.etcd.io/etcd/version"
"go.etcd.io/etcd/v3/pkg/testutil"
"go.etcd.io/etcd/v3/version"
)

type actionAssertingHTTPClient struct {
Expand Down
2 changes: 1 addition & 1 deletion client/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package client

import (
"go.etcd.io/etcd/pkg/srv"
"go.etcd.io/etcd/v3/pkg/srv"
)

// Discoverer is an interface that wraps the Discover method.
Expand Down
2 changes: 1 addition & 1 deletion client/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Create a Config and exchange it for a Client:
"net/http"
"context"
"go.etcd.io/etcd/client"
"go.etcd.io/etcd/v3/client"
)
cfg := client.Config{
Expand Down
2 changes: 1 addition & 1 deletion client/example_keys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"log"
"sort"

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

func ExampleKeysAPI_directory() {
Expand Down
6 changes: 3 additions & 3 deletions client/integration/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"sync/atomic"
"testing"

"go.etcd.io/etcd/client"
"go.etcd.io/etcd/integration"
"go.etcd.io/etcd/pkg/testutil"
"go.etcd.io/etcd/v3/client"
"go.etcd.io/etcd/v3/integration"
"go.etcd.io/etcd/v3/pkg/testutil"
)

// TestV2NoRetryEOF tests destructive api calls won't retry on a disconnection.
Expand Down
2 changes: 1 addition & 1 deletion client/integration/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"testing"

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

func TestMain(m *testing.M) {
Expand Down
3 changes: 2 additions & 1 deletion client/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ import (
"encoding/json"
"errors"
"fmt"
"go.etcd.io/etcd/pkg/pathutil"
"net/http"
"net/url"
"strconv"
"strings"
"time"

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

const (
Expand Down
6 changes: 3 additions & 3 deletions client/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"testing"
"time"

"go.etcd.io/etcd/integration"
"go.etcd.io/etcd/pkg/testutil"
"go.etcd.io/etcd/pkg/transport"
"go.etcd.io/etcd/v3/integration"
"go.etcd.io/etcd/v3/pkg/testutil"
"go.etcd.io/etcd/v3/pkg/transport"
)

var exampleEndpoints []string
Expand Down
2 changes: 1 addition & 1 deletion client/members.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"net/url"
"path"

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

var (
Expand Down
2 changes: 1 addition & 1 deletion client/members_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"reflect"
"testing"

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

func TestMembersAPIActionList(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions clientv3/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"fmt"
"strings"

"go.etcd.io/etcd/auth/authpb"
pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
"go.etcd.io/etcd/v3/auth/authpb"
pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
"google.golang.org/grpc"
)

Expand Down
3 changes: 1 addition & 2 deletions clientv3/balancer/balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import (
"sync"
"time"

"go.etcd.io/etcd/clientv3/balancer/picker"

"go.etcd.io/etcd/v3/clientv3/balancer/picker"
"go.uber.org/zap"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/connectivity"
Expand Down
9 changes: 4 additions & 5 deletions clientv3/balancer/balancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ import (
"testing"
"time"

"go.etcd.io/etcd/clientv3/balancer/picker"
"go.etcd.io/etcd/clientv3/balancer/resolver/endpoint"
pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
"go.etcd.io/etcd/pkg/mock/mockserver"

"go.etcd.io/etcd/v3/clientv3/balancer/picker"
"go.etcd.io/etcd/v3/clientv3/balancer/resolver/endpoint"
pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
"go.etcd.io/etcd/v3/pkg/mock/mockserver"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
Expand Down
3 changes: 1 addition & 2 deletions clientv3/balancer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
package balancer

import (
"go.etcd.io/etcd/clientv3/balancer/picker"

"go.etcd.io/etcd/v3/clientv3/balancer/picker"
"go.uber.org/zap"
)

Expand Down
5 changes: 2 additions & 3 deletions clientv3/balancer/grpc1.7-health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ import (
"testing"
"time"

pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
"go.etcd.io/etcd/pkg/testutil"

pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
"go.etcd.io/etcd/v3/pkg/testutil"
"google.golang.org/grpc"
)

Expand Down
10 changes: 5 additions & 5 deletions clientv3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
"time"

"github.com/google/uuid"
"go.etcd.io/etcd/clientv3/balancer"
"go.etcd.io/etcd/clientv3/balancer/picker"
"go.etcd.io/etcd/clientv3/balancer/resolver/endpoint"
"go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes"
"go.etcd.io/etcd/pkg/logutil"
"go.etcd.io/etcd/v3/clientv3/balancer"
"go.etcd.io/etcd/v3/clientv3/balancer/picker"
"go.etcd.io/etcd/v3/clientv3/balancer/resolver/endpoint"
"go.etcd.io/etcd/v3/etcdserver/api/v3rpc/rpctypes"
"go.etcd.io/etcd/v3/pkg/logutil"
"go.uber.org/zap"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
Expand Down
5 changes: 2 additions & 3 deletions clientv3/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import (
"testing"
"time"

"go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes"
"go.etcd.io/etcd/pkg/testutil"

"go.etcd.io/etcd/v3/etcdserver/api/v3rpc/rpctypes"
"go.etcd.io/etcd/v3/pkg/testutil"
"google.golang.org/grpc"
)

Expand Down
4 changes: 2 additions & 2 deletions clientv3/clientv3util/example_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import (
"context"
"log"

"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/clientv3/clientv3util"
"go.etcd.io/etcd/v3/clientv3"
"go.etcd.io/etcd/v3/clientv3/clientv3util"
)

func ExampleKeyMissing() {
Expand Down
2 changes: 1 addition & 1 deletion clientv3/clientv3util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package clientv3util

import (
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/v3/clientv3"
)

// KeyExists returns a comparison operation that evaluates to true iff the given
Expand Down
5 changes: 2 additions & 3 deletions clientv3/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ package clientv3
import (
"context"

pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
"go.etcd.io/etcd/pkg/types"

pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
"go.etcd.io/etcd/v3/pkg/types"
"google.golang.org/grpc"
)

Expand Down
2 changes: 1 addition & 1 deletion clientv3/compact_op.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package clientv3

import (
pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
)

// CompactOp represents a compact operation.
Expand Down
2 changes: 1 addition & 1 deletion clientv3/compact_op_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"reflect"
"testing"

"go.etcd.io/etcd/etcdserver/etcdserverpb"
"go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
)

func TestCompactOp(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion clientv3/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package clientv3

import (
pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
)

type CompareTarget int
Expand Down
6 changes: 3 additions & 3 deletions clientv3/concurrency/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
"errors"
"fmt"

v3 "go.etcd.io/etcd/clientv3"
pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
"go.etcd.io/etcd/mvcc/mvccpb"
v3 "go.etcd.io/etcd/v3/clientv3"
pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
"go.etcd.io/etcd/v3/mvcc/mvccpb"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions clientv3/concurrency/election_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"testing"
"time"

"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/clientv3/concurrency"
"go.etcd.io/etcd/v3/clientv3"
"go.etcd.io/etcd/v3/clientv3/concurrency"
)

func TestResumeElection(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions clientv3/concurrency/example_election_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"sync"
"time"

"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/clientv3/concurrency"
"go.etcd.io/etcd/v3/clientv3"
"go.etcd.io/etcd/v3/clientv3/concurrency"
)

func ExampleElection_Campaign() {
Expand Down
4 changes: 2 additions & 2 deletions clientv3/concurrency/example_mutex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"fmt"
"log"

"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/clientv3/concurrency"
"go.etcd.io/etcd/v3/clientv3"
"go.etcd.io/etcd/v3/clientv3/concurrency"
)

func ExampleMutex_Lock() {
Expand Down
4 changes: 2 additions & 2 deletions clientv3/concurrency/example_stm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"math/rand"
"sync"

"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/clientv3/concurrency"
"go.etcd.io/etcd/v3/clientv3"
"go.etcd.io/etcd/v3/clientv3/concurrency"
)

// ExampleSTM_apply shows how to use STM with a transactional
Expand Down
6 changes: 3 additions & 3 deletions clientv3/concurrency/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import (
"context"
"fmt"

v3 "go.etcd.io/etcd/clientv3"
pb "go.etcd.io/etcd/etcdserver/etcdserverpb"
"go.etcd.io/etcd/mvcc/mvccpb"
v3 "go.etcd.io/etcd/v3/clientv3"
pb "go.etcd.io/etcd/v3/etcdserver/etcdserverpb"
"go.etcd.io/etcd/v3/mvcc/mvccpb"
)

func waitDelete(ctx context.Context, client *v3.Client, key string, rev int64) error {
Expand Down
Loading

0 comments on commit 0ffee56

Please sign in to comment.