Преглед на файлове

reorg imports, format code (#1024)

Kevin Wan преди 3 години
родител
ревизия
0b6bc69afa

+ 0 - 1
core/stores/clickhouse/clickhouse.go

@@ -1,7 +1,6 @@
 package clickhouse
 
 import (
-	// imports the driver.
 	_ "github.com/ClickHouse/clickhouse-go"
 	"github.com/tal-tech/go-zero/core/stores/sqlx"
 )

+ 0 - 1
core/stores/postgres/postgresql.go

@@ -1,7 +1,6 @@
 package postgres
 
 import (
-	// imports the driver.
 	_ "github.com/lib/pq"
 	"github.com/tal-tech/go-zero/core/stores/sqlx"
 )

+ 0 - 1
core/trace/opentelemetry/tracer_test.go

@@ -173,7 +173,6 @@ func TestExtractValidTraceContext(t *testing.T) {
 }
 
 func TestExtractInvalidTraceContext(t *testing.T) {
-
 	tests := []struct {
 		name   string
 		header string

+ 1 - 2
tools/goctl/goctl.go

@@ -6,8 +6,6 @@ import (
 	"runtime"
 
 	"github.com/logrusorgru/aurora"
-	"github.com/urfave/cli"
-
 	"github.com/tal-tech/go-zero/core/load"
 	"github.com/tal-tech/go-zero/core/logx"
 	"github.com/tal-tech/go-zero/core/stat"
@@ -32,6 +30,7 @@ import (
 	rpc "github.com/tal-tech/go-zero/tools/goctl/rpc/cli"
 	"github.com/tal-tech/go-zero/tools/goctl/tpl"
 	"github.com/tal-tech/go-zero/tools/goctl/upgrade"
+	"github.com/urfave/cli"
 )
 
 var commands = []cli.Command{

+ 1 - 2
tools/goctl/rpc/cli/cli.go

@@ -6,11 +6,10 @@ import (
 	"path/filepath"
 	"runtime"
 
-	"github.com/urfave/cli"
-
 	"github.com/tal-tech/go-zero/tools/goctl/rpc/generator"
 	"github.com/tal-tech/go-zero/tools/goctl/util"
 	"github.com/tal-tech/go-zero/tools/goctl/util/env"
+	"github.com/urfave/cli"
 )
 
 // RPC is to generate rpc service code from a proto file by specifying a proto file using flag src,

+ 0 - 1
tools/goctl/rpc/generator/gen_test.go

@@ -8,7 +8,6 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-
 	"github.com/tal-tech/go-zero/core/logx"
 	"github.com/tal-tech/go-zero/core/stringx"
 	conf "github.com/tal-tech/go-zero/tools/goctl/config"

+ 0 - 1
tools/goctl/util/console/console.go

@@ -6,7 +6,6 @@ import (
 	"runtime"
 
 	"github.com/logrusorgru/aurora"
-
 	"github.com/tal-tech/go-zero/tools/goctl/vars"
 )