From e4078e2c346b0c70825f5b6a13b60c835851c193 Mon Sep 17 00:00:00 2001 From: LaurenceLiZhixin <382673304@qq.com> Date: Thu, 29 Jul 2021 22:15:31 +0800 Subject: [PATCH] fix: fmt --- common/url.go | 7 +------ registry/service_instance.go | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/common/url.go b/common/url.go index f395258cce..b279ecae2a 100644 --- a/common/url.go +++ b/common/url.go @@ -39,7 +39,6 @@ import ( import ( "dubbo.apache.org/dubbo-go/v3/common/constant" - "dubbo.apache.org/dubbo-go/v3/common/logger" ) // dubbo role type constant @@ -206,11 +205,7 @@ func WithToken(token string) Option { if len(token) > 0 { value := token if strings.ToLower(token) == "true" || strings.ToLower(token) == "default" { - u, err := uuid.NewV4() - if err != nil { - logger.Errorf("could not generator UUID: %v", err) - return - } + u := uuid.NewV4() value = u.String() } url.SetParam(constant.TOKEN_KEY, value) diff --git a/registry/service_instance.go b/registry/service_instance.go index 402469d524..6e0ffeeb53 100644 --- a/registry/service_instance.go +++ b/registry/service_instance.go @@ -74,8 +74,8 @@ type ServiceInstance interface { // nolint type Endpoint struct { - Port int `json:"port, omitempty"` - Protocol string `json:"protocol, omitempty"` + Port int `json:"port,omitempty"` + Protocol string `json:"protocol,omitempty"` } // DefaultServiceInstance the default implementation of ServiceInstance