mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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:
@@ -16,7 +16,7 @@ For example,
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"go.etcd.io/etcd/v3/pkg/adt"
|
||||
"go.etcd.io/etcd/pkg/v3/adt"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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".
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"go.etcd.io/etcd/v3/pkg/types"
|
||||
"go.etcd.io/etcd/pkg/v3/types"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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") ||
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"go.etcd.io/etcd/v3/pkg/testutil"
|
||||
"go.etcd.io/etcd/pkg/v3/testutil"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user