From a48bf9af68373f783835deb0cae1725ab7e58be0 Mon Sep 17 00:00:00 2001 From: "vito.he" <hxmhlt@163.com> Date: Sun, 30 Jun 2019 00:24:31 +0800 Subject: [PATCH] Mod:format code --- common/url.go | 12 ------------ config/provider_config.go | 3 ++- config_center/zookeeper/impl_test.go | 2 ++ 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/common/url.go b/common/url.go index 4afec932d..a6223d547 100644 --- a/common/url.go +++ b/common/url.go @@ -193,18 +193,6 @@ func NewURL(ctx context.Context, urlString string, opts ...option) (URL, error) return s, perrors.Errorf("net.SplitHostPort(Url.Host{%s}), error{%v}", s.Location, err) } } - // - //timeoutStr := s.Params.Get("timeout") - //if len(timeoutStr) == 0 { - // timeoutStr = s.Params.Get("default.timeout") - //} - //if len(timeoutStr) != 0 { - // timeout, err := strconv.Atoi(timeoutStr) - // if err == nil && timeout != 0 { - // s.Timeout = time.Duration(timeout * 1e6) // timeout unit is millisecond - // } - //} - //fmt.Println(s.String()) for _, opt := range opts { opt(&s) } diff --git a/config/provider_config.go b/config/provider_config.go index b2f44ea00..fc7a4d50d 100644 --- a/config/provider_config.go +++ b/config/provider_config.go @@ -18,7 +18,6 @@ package config import ( "context" - "github.com/apache/dubbo-go/common/constant" "io/ioutil" "path" ) @@ -27,7 +26,9 @@ import ( perrors "github.com/pkg/errors" "gopkg.in/yaml.v2" ) + import ( + "github.com/apache/dubbo-go/common/constant" "github.com/apache/dubbo-go/common/logger" ) diff --git a/config_center/zookeeper/impl_test.go b/config_center/zookeeper/impl_test.go index 2ef66ae84..26b899e82 100644 --- a/config_center/zookeeper/impl_test.go +++ b/config_center/zookeeper/impl_test.go @@ -22,10 +22,12 @@ import ( "sync" "testing" ) + import ( "github.com/samuel/go-zookeeper/zk" "github.com/stretchr/testify/assert" ) + import ( "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/config_center" -- GitLab