Skip to content

Commit

Permalink
format imports by imports-formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
PangXing committed May 20, 2022
1 parent 6399602 commit 7ae076c
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 16 deletions.
7 changes: 5 additions & 2 deletions pkg/executor/redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@ import (
stdErrors "errors"
"sync"
"time"
)

import (
"github.com/arana-db/parser"
"github.com/arana-db/parser/ast"

"github.com/pkg/errors"
)

import (
mConstants "github.com/arana-db/arana/pkg/constants/mysql"
"github.com/arana-db/arana/pkg/metrics"
"github.com/arana-db/arana/pkg/mysql"

mysqlErrors "github.com/arana-db/arana/pkg/mysql/errors"
"github.com/arana-db/arana/pkg/proto"
"github.com/arana-db/arana/pkg/runtime"

rcontext "github.com/arana-db/arana/pkg/runtime/context"
"github.com/arana-db/arana/pkg/security"
"github.com/arana-db/arana/pkg/util/log"
Expand Down
10 changes: 8 additions & 2 deletions pkg/runtime/ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,23 @@ import (
"fmt"
"strconv"
"strings"
)

"github.com/arana-db/arana/pkg/runtime/cmp"
"github.com/arana-db/arana/pkg/runtime/logical"
import (
"github.com/arana-db/parser"
"github.com/arana-db/parser/ast"
"github.com/arana-db/parser/mysql"
"github.com/arana-db/parser/opcode"
"github.com/arana-db/parser/test_driver"

"github.com/pkg/errors"
)

import (
"github.com/arana-db/arana/pkg/runtime/cmp"
"github.com/arana-db/arana/pkg/runtime/logical"
)

var (
_opcode2comparison = map[opcode.Op]cmp.Comparison{
opcode.EQ: cmp.Ceq,
Expand Down
2 changes: 2 additions & 0 deletions pkg/runtime/ast/ast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ package ast
import (
"strings"
"testing"
)

import (
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 2 additions & 0 deletions pkg/runtime/ast/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ package ast
import (
"fmt"
"strings"
)

import (
"github.com/pkg/errors"
)

Expand Down
12 changes: 8 additions & 4 deletions pkg/runtime/optimize/optimizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,20 @@ import (
"context"
stdErrors "errors"
"strings"
)

"github.com/arana-db/arana/pkg/proto"
"github.com/arana-db/arana/pkg/proto/rule"
"github.com/arana-db/arana/pkg/proto/schema_manager"
import (
"github.com/arana-db/parser/ast"

"github.com/pkg/errors"
)

import (
"github.com/arana-db/arana/pkg/proto"
"github.com/arana-db/arana/pkg/proto/rule"
"github.com/arana-db/arana/pkg/proto/schema_manager"
rast "github.com/arana-db/arana/pkg/runtime/ast"
"github.com/arana-db/arana/pkg/runtime/cmp"

rcontext "github.com/arana-db/arana/pkg/runtime/context"
"github.com/arana-db/arana/pkg/runtime/plan"
"github.com/arana-db/arana/pkg/transformer"
Expand Down
12 changes: 9 additions & 3 deletions pkg/runtime/optimize/optimizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@ import (
"fmt"
"strings"
"testing"
)

"github.com/arana-db/arana/pkg/mysql"
"github.com/arana-db/arana/pkg/proto"
"github.com/arana-db/arana/pkg/proto/rule"
import (
"github.com/arana-db/parser"

"github.com/golang/mock/gomock"

"github.com/stretchr/testify/assert"
)

import (
"github.com/arana-db/arana/pkg/mysql"
"github.com/arana-db/arana/pkg/proto"
"github.com/arana-db/arana/pkg/proto/rule"
rcontext "github.com/arana-db/arana/pkg/runtime/context"
"github.com/arana-db/arana/testdata"
)
Expand Down
13 changes: 10 additions & 3 deletions pkg/runtime/plan/alter_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,22 @@ package plan
import (
"context"
"strings"
)

import (
"github.com/pkg/errors"

uatomic "go.uber.org/atomic"

"golang.org/x/sync/errgroup"
)

import (
"github.com/arana-db/arana/pkg/mysql"
"github.com/arana-db/arana/pkg/proto"
"github.com/arana-db/arana/pkg/proto/rule"
"github.com/arana-db/arana/pkg/runtime/ast"
"github.com/arana-db/arana/pkg/util/log"
"github.com/pkg/errors"
uatomic "go.uber.org/atomic"
"golang.org/x/sync/errgroup"
)

var _ proto.Plan = (*AlterTablePlan)(nil)
Expand Down
6 changes: 5 additions & 1 deletion pkg/runtime/plan/transparent.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ package plan
import (
"context"
"strings"
)

"github.com/arana-db/arana/pkg/proto"
import (
"github.com/pkg/errors"
)

import (
"github.com/arana-db/arana/pkg/proto"
rast "github.com/arana-db/arana/pkg/runtime/ast"
)

Expand Down
7 changes: 6 additions & 1 deletion test/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ import (
"fmt"
"testing"
"time"
)

"github.com/arana-db/arana/pkg/util/rand2"
import (
_ "github.com/go-sql-driver/mysql" // register mysql

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)

import (
"github.com/arana-db/arana/pkg/util/rand2"
utils "github.com/arana-db/arana/pkg/util/tableprint"
)

Expand Down

0 comments on commit 7ae076c

Please sign in to comment.