Skip to content

Commit

Permalink
Mod:format import & fix smell code
Browse files Browse the repository at this point in the history
  • Loading branch information
hxmhlt committed May 29, 2019
1 parent aa913cc commit 11661bc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ package common

import (
"context"
"github.com/dubbo/go-for-apache-dubbo/common/constant"
"net/url"
"testing"
)

import (
"github.com/dubbo/go-for-apache-dubbo/common/constant"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 3 additions & 1 deletion common/utils/strings_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package utils

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

func Test_RegSplit(t *testing.T) {
strings := RegSplit("dubbo://123.1.2.1;jsonrpc://127.0.0.1;registry://3.2.1.3?registry=zookeeper", "\\s*[;]+\\s*")
Expand Down
2 changes: 1 addition & 1 deletion config/reference_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (refconfig *ReferenceConfig) Refer() {
refconfig.invoker = extension.GetProtocol(refconfig.urls[0].Protocol).Refer(*refconfig.urls[0])
} else {
invokers := []protocol.Invoker{}
var regUrl *common.URL = nil
var regUrl *common.URL
for _, u := range refconfig.urls {
invokers = append(invokers, extension.GetProtocol(u.Protocol).Refer(*u))
if u.Protocol == constant.REGISTRY_PROTOCOL {
Expand Down
1 change: 1 addition & 0 deletions config/testdata/consumer_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ references:
filter: ""
protocol : "dubbo"
interface : "com.ikurento.user.UserProvider"
url: "dubbo://127.0.0.1:20000"
cluster: "failover"
methods :
- name: "GetUser"
Expand Down

0 comments on commit 11661bc

Please sign in to comment.