diff --git a/core/trace/agent.go b/core/trace/agent.go index 1da33040..668ae7ed 100644 --- a/core/trace/agent.go +++ b/core/trace/agent.go @@ -5,6 +5,8 @@ import ( "fmt" "sync" + "github.com/zeromicro/go-zero/core/lang" + "github.com/zeromicro/go-zero/core/logx" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/exporters/jaeger" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" @@ -12,9 +14,6 @@ import ( "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" semconv "go.opentelemetry.io/otel/semconv/v1.4.0" - - "github.com/zeromicro/go-zero/core/lang" - "github.com/zeromicro/go-zero/core/logx" ) const ( diff --git a/core/trace/agent_test.go b/core/trace/agent_test.go index 81268e35..bd3810b4 100644 --- a/core/trace/agent_test.go +++ b/core/trace/agent_test.go @@ -4,7 +4,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/zeromicro/go-zero/core/logx" ) diff --git a/tools/goctl/api/spec/example_test.go b/tools/goctl/api/spec/example_test.go index eaa1651d..20a28c66 100644 --- a/tools/goctl/api/spec/example_test.go +++ b/tools/goctl/api/spec/example_test.go @@ -2,6 +2,7 @@ package spec_test import ( "fmt" + "github.com/zeromicro/go-zero/tools/goctl/api/spec" ) diff --git a/tools/goctl/api/tsgen/util_test.go b/tools/goctl/api/tsgen/util_test.go index de11800b..d9e88969 100644 --- a/tools/goctl/api/tsgen/util_test.go +++ b/tools/goctl/api/tsgen/util_test.go @@ -1,9 +1,10 @@ package tsgen import ( + "testing" + "github.com/stretchr/testify/assert" "github.com/zeromicro/go-zero/tools/goctl/api/spec" - "testing" ) func TestGenTsType(t *testing.T) { diff --git a/tools/goctl/example/rpc/hello/internal/server/greet/greetserver.go b/tools/goctl/example/rpc/hello/internal/server/greet/greetserver.go index f0a4d383..e02ba3d0 100644 --- a/tools/goctl/example/rpc/hello/internal/server/greet/greetserver.go +++ b/tools/goctl/example/rpc/hello/internal/server/greet/greetserver.go @@ -6,7 +6,7 @@ package server import ( "context" - "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hello/internal/logic/greet" + greetlogic "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hello/internal/logic/greet" "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hello/internal/svc" "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hello/pb/hello" ) diff --git a/tools/goctl/example/rpc/hello/pb/hello/hello.pb.go b/tools/goctl/example/rpc/hello/pb/hello/hello.pb.go index 3d9e24bd..25708336 100644 --- a/tools/goctl/example/rpc/hello/pb/hello/hello.pb.go +++ b/tools/goctl/example/rpc/hello/pb/hello/hello.pb.go @@ -7,10 +7,11 @@ package hello import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/tools/goctl/example/rpc/hello/pb/hello/hello_grpc.pb.go b/tools/goctl/example/rpc/hello/pb/hello/hello_grpc.pb.go index 1eb025b2..eeb38f1b 100644 --- a/tools/goctl/example/rpc/hello/pb/hello/hello_grpc.pb.go +++ b/tools/goctl/example/rpc/hello/pb/hello/hello_grpc.pb.go @@ -8,6 +8,7 @@ package hello import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/tools/goctl/example/rpc/hi/internal/server/event/eventserver.go b/tools/goctl/example/rpc/hi/internal/server/event/eventserver.go index ac89b0c6..22cd2a37 100644 --- a/tools/goctl/example/rpc/hi/internal/server/event/eventserver.go +++ b/tools/goctl/example/rpc/hi/internal/server/event/eventserver.go @@ -6,7 +6,7 @@ package server import ( "context" - "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/internal/logic/event" + eventlogic "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/internal/logic/event" "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/internal/svc" "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/pb/hi" ) diff --git a/tools/goctl/example/rpc/hi/internal/server/greet/greetserver.go b/tools/goctl/example/rpc/hi/internal/server/greet/greetserver.go index 4308e1fa..a6212826 100644 --- a/tools/goctl/example/rpc/hi/internal/server/greet/greetserver.go +++ b/tools/goctl/example/rpc/hi/internal/server/greet/greetserver.go @@ -6,7 +6,7 @@ package server import ( "context" - "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/internal/logic/greet" + greetlogic "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/internal/logic/greet" "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/internal/svc" "github.com/zeromicro/go-zero/tools/goctl/example/rpc/hi/pb/hi" ) diff --git a/tools/goctl/example/rpc/hi/pb/hi/hi.pb.go b/tools/goctl/example/rpc/hi/pb/hi/hi.pb.go index d523fb1a..b53bdc72 100644 --- a/tools/goctl/example/rpc/hi/pb/hi/hi.pb.go +++ b/tools/goctl/example/rpc/hi/pb/hi/hi.pb.go @@ -7,10 +7,11 @@ package hi import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" ) const ( diff --git a/tools/goctl/example/rpc/hi/pb/hi/hi_grpc.pb.go b/tools/goctl/example/rpc/hi/pb/hi/hi_grpc.pb.go index 62c20326..079d40eb 100644 --- a/tools/goctl/example/rpc/hi/pb/hi/hi_grpc.pb.go +++ b/tools/goctl/example/rpc/hi/pb/hi/hi_grpc.pb.go @@ -8,6 +8,7 @@ package hi import ( context "context" + grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status"