Skip to content

Commit 6300e23

Browse files
committed
*.: keep import called lib consistent with radon #120
1 parent bfa9c07 commit 6300e23

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+138
-76
lines changed

src/cli/callx/callx.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,17 @@ package callx
1010

1111
import (
1212
"bytes"
13-
"config"
1413
"fmt"
1514
"io/ioutil"
16-
"model"
1715
"os"
18-
"raft"
1916
"strconv"
2017
"strings"
2118
"text/tabwriter"
2219
"time"
20+
21+
"config"
22+
"model"
23+
"raft"
2324
"xbase/xlog"
2425
"xbase/xrpc"
2526

src/cli/cli.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
package main
1010

1111
import (
12-
"cli/cmd"
1312
"fmt"
1413
"os"
1514

15+
"cli/cmd"
16+
1617
"github.com/spf13/cobra"
1718
)
1819

src/cli/cmd/cluster.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,19 @@ package cmd
1010

1111
import (
1212
"bufio"
13-
"cli/callx"
1413
"encoding/json"
1514
"fmt"
16-
"model"
1715
"net"
1816
"os"
1917
"path"
2018
"path/filepath"
21-
"raft"
2219
"regexp"
2320
"sort"
2421
"strings"
22+
23+
"cli/callx"
24+
"model"
25+
"raft"
2526
"xbase/common"
2627

2728
"github.com/spf13/cobra"

src/cli/cmd/cluster_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ package cmd
1010

1111
import (
1212
"fmt"
13+
"testing"
14+
1315
"raft"
1416
"server"
15-
"testing"
1617
"xbase/common"
1718
"xbase/xlog"
1819

src/cli/cmd/common.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ package cmd
1010

1111
import (
1212
"bytes"
13-
"config"
1413
"fmt"
1514
"io/ioutil"
16-
"model"
1715
"os"
1816
"path/filepath"
1917
"runtime"
2018
"strings"
19+
20+
"config"
21+
"model"
2122
"xbase/xlog"
2223

2324
"github.com/spf13/cobra"

src/cli/cmd/init.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ package cmd
1111
import (
1212
"fmt"
1313
"strings"
14+
1415
"xbase/common"
1516

1617
"github.com/spf13/cobra"

src/cli/cmd/mock.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package cmd
22

33
import (
4-
"config"
54
"os"
5+
6+
"config"
67
)
78

89
var defaultConfig = config.Config{

src/cli/cmd/mysql.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
package cmd
1010

1111
import (
12-
"cli/callx"
1312
"encoding/json"
1413
"fmt"
15-
"model"
1614
"path"
1715
"strconv"
1816
"strings"
1917
"time"
18+
19+
"cli/callx"
20+
"model"
2021
"xbase/common"
2122

2223
"github.com/spf13/cobra"

src/cli/cmd/mysql_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
package cmd
1010

1111
import (
12+
"testing"
13+
1214
"mysql"
1315
"raft"
1416
"server"
15-
"testing"
1617
"xbase/common"
1718
"xbase/xlog"
1819

src/cli/cmd/perf.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ package cmd
1111
import (
1212
"encoding/json"
1313
"fmt"
14+
1415
"xbase/common"
1516
"xbase/xlog"
1617

src/cli/cmd/raft.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
package cmd
1010

1111
import (
12-
"cli/callx"
1312
"encoding/json"
1413
"fmt"
1514
"strings"
1615

16+
"cli/callx"
17+
1718
"github.com/spf13/cobra"
1819
)
1920

src/cli/cmd/raft_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ package cmd
1111
import (
1212
"errors"
1313
"fmt"
14-
"raft"
15-
"server"
1614
"testing"
1715
"time"
16+
17+
"raft"
18+
"server"
1819
"xbase/common"
1920
"xbase/xlog"
2021

src/cli/cmd/version.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
package cmd
1010

1111
import (
12-
"build"
1312
"fmt"
1413

14+
"build"
15+
1516
"github.com/spf13/cobra"
1617
)
1718

src/cli/cmd/xenon.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
package cmd
1010

1111
import (
12-
"cli/callx"
1312
"fmt"
13+
14+
"cli/callx"
15+
1416
"github.com/spf13/cobra"
1517
)
1618

src/cli/cmd/xenon_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
package cmd
1010

1111
import (
12-
"server"
1312
"testing"
13+
14+
"server"
1415
"xbase/common"
1516
"xbase/xlog"
1617

src/mysql/api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ package mysql
1111
import (
1212
"database/sql"
1313
"fmt"
14-
"model"
1514
"strconv"
1615
"strings"
1716
"time"
1817

18+
"model"
19+
1920
"github.com/pkg/errors"
2021
)
2122

src/mysql/api_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
package mysql
1010

1111
import (
12-
"config"
1312
"fmt"
14-
"model"
1513
"testing"
14+
15+
"config"
16+
"model"
1617
"xbase/xlog"
1718

1819
_ "github.com/go-sql-driver/mysql"

src/mysql/attr.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ package mysql
1010

1111
import (
1212
"fmt"
13+
1314
"model"
1415
)
1516

src/mysql/db.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ package mysql
1010

1111
import (
1212
"database/sql"
13-
"github.com/pkg/errors"
13+
1414
"xbase/common"
1515

1616
// driver.
1717
_ "github.com/go-sql-driver/mysql"
18+
"github.com/pkg/errors"
1819
)
1920

2021
// Query executes a query that returns rows

src/mysql/mock.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
package mysql
1010

1111
import (
12-
"config"
1312
"database/sql"
1413
"fmt"
15-
"model"
1614
"testing"
15+
16+
"config"
17+
"model"
1718
"xbase/xlog"
1819
"xbase/xrpc"
1920

src/mysql/mysql.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
package mysql
1010

1111
import (
12-
"config"
1312
"database/sql"
1413
"fmt"
15-
"model"
1614
"sync"
1715
"time"
16+
17+
"config"
18+
"model"
1819
"xbase/common"
1920
"xbase/xlog"
2021
)

src/mysql/mysql_handler.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ package mysql
1010

1111
import (
1212
"database/sql"
13+
1314
"model"
1415
)
1516

src/mysql/mysql_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
package mysql
1010

1111
import (
12-
"config"
13-
"model"
1412
"testing"
1513
"time"
14+
15+
"config"
16+
"model"
1617
"xbase/common"
1718
"xbase/xlog"
1819

src/mysql/mysqlbase.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ package mysql
1111
import (
1212
"database/sql"
1313
"fmt"
14-
"model"
1514
"strconv"
1615
"strings"
1716

17+
"model"
18+
1819
"github.com/pkg/errors"
1920
)
2021

src/mysql/mysqlbase_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ package mysql
1010

1111
import (
1212
"fmt"
13-
"model"
1413
"testing"
1514

1615
"config"
16+
"model"
1717
"xbase/xlog"
1818

1919
_ "github.com/go-sql-driver/mysql"

src/mysql/rpc_mysql_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
package mysql
1010

1111
import (
12-
"model"
1312
"testing"
13+
14+
"model"
1415
"xbase/common"
1516
"xbase/xlog"
1617

src/mysql/stats.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
package mysql
1010

1111
import (
12-
"model"
1312
"sync/atomic"
13+
14+
"model"
1415
)
1516

1617
// IncMysqlDowns used to increase the mysql down counter.

src/mysqld/backup.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
package mysqld
1010

1111
import (
12-
"config"
1312
"fmt"
14-
"model"
1513
"strings"
1614
"time"
15+
16+
"config"
17+
"model"
1718
"xbase/common"
1819
"xbase/xlog"
1920

src/mysqld/backup_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
package mysqld
1010

1111
import (
12+
"testing"
13+
1214
"config"
1315
"model"
14-
"testing"
1516
"xbase/common"
1617
"xbase/xlog"
1718

src/mysqld/linux_args.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
package mysqld
1010

1111
import (
12-
"config"
1312
"fmt"
1413
"path/filepath"
14+
15+
"config"
1516
)
1617

1718
var (

0 commit comments

Comments
 (0)