Skip to content
Snippets Groups Projects
Commit 3635fea2 authored by vito.he's avatar vito.he
Browse files

Mod:format import & fix smell code

parent be8e3b7b
No related branches found
No related tags found
No related merge requests found
......@@ -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"
)
......
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*")
......
......@@ -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 {
......
......@@ -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"
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment