pkg: Rename imports after making 'pkg' a module

find -name '*.go' | xargs sed --follow-symlinks -i 's|go.etcd.io/etcd/v3/pkg/|go.etcd.io/etcd/pkg/v3/|g'
go fmt ./...
This commit is contained in:
Piotr Tabor
2020-10-13 00:01:51 +02:00
parent bfa91d48af
commit de55bb6331
260 changed files with 368 additions and 366 deletions

View File

@@ -16,7 +16,7 @@ For example,
import (
"fmt"
"go.etcd.io/etcd/v3/pkg/adt"
"go.etcd.io/etcd/pkg/v3/adt"
)
func main() {

View File

@@ -17,7 +17,7 @@ package adt_test
import (
"fmt"
"go.etcd.io/etcd/v3/pkg/adt"
"go.etcd.io/etcd/pkg/v3/adt"
)
func Example() {

View File

@@ -21,7 +21,7 @@ import (
"sort"
"strings"
"go.etcd.io/etcd/v3/pkg/types"
"go.etcd.io/etcd/pkg/v3/types"
)
// UniqueURLs contains unique URLs

View File

@@ -20,7 +20,7 @@ import (
"net/url"
"strings"
"go.etcd.io/etcd/v3/pkg/types"
"go.etcd.io/etcd/pkg/v3/types"
)
// URLsValue wraps "types.URLs".

View File

@@ -18,7 +18,7 @@ import (
"io"
"os"
"go.etcd.io/etcd/v3/pkg/fileutil"
"go.etcd.io/etcd/pkg/v3/fileutil"
)
// WriteAndSyncFile behaves just like ioutil.WriteFile in the standard library,

View File

@@ -20,7 +20,7 @@ import (
"strings"
"testing"
"go.etcd.io/etcd/v3/pkg/logutil"
"go.etcd.io/etcd/pkg/v3/logutil"
"google.golang.org/grpc/grpclog"
)

View File

@@ -24,7 +24,7 @@ import (
"os"
"path/filepath"
"go.etcd.io/etcd/v3/pkg/systemd"
"go.etcd.io/etcd/pkg/v3/systemd"
"github.com/coreos/go-systemd/v22/journal"
"go.uber.org/zap/zapcore"

View File

@@ -23,7 +23,7 @@ import (
"sort"
"time"
"go.etcd.io/etcd/v3/pkg/types"
"go.etcd.io/etcd/pkg/v3/types"
"go.uber.org/zap"
)

View File

@@ -24,7 +24,7 @@ import (
"sort"
"syscall"
"go.etcd.io/etcd/v3/pkg/cpuutil"
"go.etcd.io/etcd/pkg/v3/cpuutil"
)
var errNoDefaultRoute = fmt.Errorf("could not find default route")

View File

@@ -26,7 +26,7 @@ import (
"sync"
"time"
"go.etcd.io/etcd/v3/pkg/transport"
"go.etcd.io/etcd/pkg/v3/transport"
humanize "github.com/dustin/go-humanize"
"go.uber.org/zap"

View File

@@ -29,7 +29,7 @@ import (
"testing"
"time"
"go.etcd.io/etcd/v3/pkg/transport"
"go.etcd.io/etcd/pkg/v3/transport"
"go.uber.org/zap"
)

View File

@@ -21,7 +21,7 @@ import (
"net/url"
"strings"
"go.etcd.io/etcd/v3/pkg/types"
"go.etcd.io/etcd/pkg/v3/types"
)
var (

View File

@@ -21,7 +21,7 @@ import (
"strings"
"testing"
"go.etcd.io/etcd/v3/pkg/testutil"
"go.etcd.io/etcd/pkg/v3/testutil"
)
func TestSRVGetCluster(t *testing.T) {

View File

@@ -21,7 +21,7 @@ CheckLeakedGoroutine verifies tests do not leave any leaky
goroutines. It returns true when there are goroutines still
running(leaking) after all tests.
import "go.etcd.io/etcd/v3/pkg/testutil"
import "go.etcd.io/etcd/pkg/v3/testutil"
func TestMain(m *testing.M) {
testutil.MustTestMainWithLeakDetection(m)
@@ -116,8 +116,8 @@ func interestingGoroutines() (gs []string) {
strings.Contains(stack, "created by testing.runTests") ||
strings.Contains(stack, "testing.Main(") ||
strings.Contains(stack, "runtime.goexit") ||
strings.Contains(stack, "go.etcd.io/etcd/v3/pkg/testutil.interestingGoroutines") ||
strings.Contains(stack, "go.etcd.io/etcd/v3/pkg/logutil.(*MergeLogger).outputLoop") ||
strings.Contains(stack, "go.etcd.io/etcd/pkg/v3/testutil.interestingGoroutines") ||
strings.Contains(stack, "go.etcd.io/etcd/pkg/v3/logutil.(*MergeLogger).outputLoop") ||
strings.Contains(stack, "github.com/golang/glog.(*loggingT).flushDaemon") ||
strings.Contains(stack, "created by runtime.gc") ||
strings.Contains(stack, "created by text/template/parse.lex") ||

View File

@@ -31,8 +31,8 @@ import (
"strings"
"time"
"go.etcd.io/etcd/v3/pkg/fileutil"
"go.etcd.io/etcd/v3/pkg/tlsutil"
"go.etcd.io/etcd/pkg/v3/fileutil"
"go.etcd.io/etcd/pkg/v3/tlsutil"
"go.uber.org/zap"
)

View File

@@ -18,7 +18,7 @@ import (
"reflect"
"testing"
"go.etcd.io/etcd/v3/pkg/testutil"
"go.etcd.io/etcd/pkg/v3/testutil"
)
func TestNewURLs(t *testing.T) {

View File

@@ -15,7 +15,7 @@
package types
import (
"go.etcd.io/etcd/v3/pkg/testutil"
"go.etcd.io/etcd/pkg/v3/testutil"
"reflect"
"testing"
)