Skip to content

Commit

Permalink
style(*): format imports with dubbogo/tools/imports-formatter (#1346)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mulavar authored Jul 29, 2021
1 parent 103cf14 commit 1643df2
Show file tree
Hide file tree
Showing 35 changed files with 166 additions and 93 deletions.
4 changes: 0 additions & 4 deletions cluster/cluster_impl/failover_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ import (
"dubbo.apache.org/dubbo-go/v3/protocol/invocation"
)

// ///////////////////////////
// mock invoker
// ///////////////////////////

// nolint
type MockInvoker struct {
url *common.URL
Expand Down
4 changes: 3 additions & 1 deletion cluster/router/v3router/judger/bool_match_judger.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package judger

import "dubbo.apache.org/dubbo-go/v3/config"
import (
"dubbo.apache.org/dubbo-go/v3/config"
)

// nolint
type BoolMatchJudger struct {
Expand Down
12 changes: 3 additions & 9 deletions cluster/router/v3router/router_chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,16 @@ import (
)

import (
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

import (
"dubbo.apache.org/dubbo-go/v3/cluster/router/v3router/k8s_api"
"dubbo.apache.org/dubbo-go/v3/config"
"dubbo.apache.org/dubbo-go/v3/config_center"
)

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

import (
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/yaml"
"dubbo.apache.org/dubbo-go/v3/config"
"dubbo.apache.org/dubbo-go/v3/config_center"
"dubbo.apache.org/dubbo-go/v3/protocol"
"dubbo.apache.org/dubbo-go/v3/protocol/invocation"
)
Expand Down
4 changes: 3 additions & 1 deletion common/host_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package common

import gxnet "github.com/dubbogo/gost/net"
import (
gxnet "github.com/dubbogo/gost/net"
)

var localIp string

Expand Down
6 changes: 1 addition & 5 deletions common/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ import (
"dubbo.apache.org/dubbo-go/v3/common/logger"
)

// ///////////////////////////////
// dubbo role type
// ///////////////////////////////

// role constant
// dubbo role type constant
const (
// CONSUMER is consumer role
CONSUMER = iota
Expand Down
4 changes: 3 additions & 1 deletion config/generic_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package config

import "context"
import (
"context"
)

// GenericService uses for generic invoke for service call
type GenericService struct {
Expand Down
4 changes: 3 additions & 1 deletion config/interfaces/config_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package interfaces

import "bytes"
import (
"bytes"
)

// ConfigReader is used to read config from consumer or provider
type ConfigReader interface {
Expand Down
4 changes: 3 additions & 1 deletion config/service_discovery_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package config

import "dubbo.apache.org/dubbo-go/v3/common/constant"
import (
"dubbo.apache.org/dubbo-go/v3/common/constant"
)

// ServiceDiscoveryConfig will be used to create
type ServiceDiscoveryConfig struct {
Expand Down
7 changes: 5 additions & 2 deletions filter/generic/generalizer/example.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion filter/generic/generalizer/generalizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

package generalizer

import "reflect"
import (
"reflect"
)

type Generalizer interface {

Expand Down
1 change: 0 additions & 1 deletion filter/sentinel/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import (
// 1. Must initialize Sentinel Go run environment,
// refer to https://github.com/alibaba/sentinel-golang/blob/master/api/init.go
// 2. Register rules for resources user want to guard

func init() {
extension.SetFilter(constant.SentinelConsumerFilterKey, func() filter.Filter {
return &ConsumerFilter{}
Expand Down
2 changes: 1 addition & 1 deletion filter/tps/limiter/method_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
package limiter

import (
"dubbo.apache.org/dubbo-go/v3/filter"
"net/url"
"testing"
)
Expand All @@ -32,6 +31,7 @@ import (
"dubbo.apache.org/dubbo-go/v3/common"
"dubbo.apache.org/dubbo-go/v3/common/constant"
"dubbo.apache.org/dubbo-go/v3/common/extension"
"dubbo.apache.org/dubbo-go/v3/filter"
"dubbo.apache.org/dubbo-go/v3/filter/tps/strategy"
"dubbo.apache.org/dubbo-go/v3/protocol/invocation"
)
Expand Down
4 changes: 2 additions & 2 deletions filter/tps/strategy/mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions protocol/dubbo/hessian2/hessian_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ import (
"dubbo.apache.org/dubbo-go/v3/common/logger"
)

/////////////////////////////////////////
// dubbo
/////////////////////////////////////////

func getArgType(v interface{}) string {
return GetClassDesc(v)
}
Expand Down
6 changes: 4 additions & 2 deletions protocol/dubbo/hessian2/hessian_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import (
"reflect"
"strconv"
"strings"

"dubbo.apache.org/dubbo-go/v3/common/logger"
)

import (
Expand All @@ -32,6 +30,10 @@ import (
perrors "github.com/pkg/errors"
)

import (
"dubbo.apache.org/dubbo-go/v3/common/logger"
)

// DubboResponse dubbo response
type DubboResponse struct {
RspObj interface{}
Expand Down
2 changes: 2 additions & 0 deletions protocol/dubbo/impl/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ package impl
import (
"reflect"
"regexp"
)

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

Expand Down
9 changes: 6 additions & 3 deletions protocol/dubbo3/internal/helloworld.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions protocol/dubbo3/protoc-gen-dubbo3/examples/helloworld.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions protocol/dubbo3/protoc-gen-dubbo3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ module github.com/apache/dubbo-go/protocol/dubbo3/protoc-gen-dubbo3
go 1.15

require (
github.com/dubbogo/triple v1.0.0
dubbo.apache.org/dubbo-go/v3 v3.0.0-rc2
github.com/dubbogo/triple v1.0.1
github.com/golang/protobuf v1.5.2
google.golang.org/grpc v1.36.0
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
google.golang.org/grpc v1.38.0
)
Loading

0 comments on commit 1643df2

Please sign in to comment.