Skip to content

Commit 11661bc

Browse files
committed
Mod:format import & fix smell code
1 parent aa913cc commit 11661bc

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

common/url_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ package common
1616

1717
import (
1818
"context"
19-
"github.com/dubbo/go-for-apache-dubbo/common/constant"
2019
"net/url"
2120
"testing"
2221
)
2322

2423
import (
24+
"github.com/dubbo/go-for-apache-dubbo/common/constant"
2525
"github.com/stretchr/testify/assert"
2626
)
2727

common/utils/strings_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package utils
22

33
import (
4-
"github.com/stretchr/testify/assert"
54
"testing"
65
)
6+
import (
7+
"github.com/stretchr/testify/assert"
8+
)
79

810
func Test_RegSplit(t *testing.T) {
911
strings := RegSplit("dubbo://123.1.2.1;jsonrpc://127.0.0.1;registry://3.2.1.3?registry=zookeeper", "\\s*[;]+\\s*")

config/reference_config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func (refconfig *ReferenceConfig) Refer() {
109109
refconfig.invoker = extension.GetProtocol(refconfig.urls[0].Protocol).Refer(*refconfig.urls[0])
110110
} else {
111111
invokers := []protocol.Invoker{}
112-
var regUrl *common.URL = nil
112+
var regUrl *common.URL
113113
for _, u := range refconfig.urls {
114114
invokers = append(invokers, extension.GetProtocol(u.Protocol).Refer(*u))
115115
if u.Protocol == constant.REGISTRY_PROTOCOL {

config/testdata/consumer_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ references:
3838
filter: ""
3939
protocol : "dubbo"
4040
interface : "com.ikurento.user.UserProvider"
41+
url: "dubbo://127.0.0.1:20000"
4142
cluster: "failover"
4243
methods :
4344
- name: "GetUser"

0 commit comments

Comments
 (0)