Skip to content

Commit

Permalink
fix: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceLiZhixin committed Jul 29, 2021
1 parent 8128fcf commit e4078e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions common/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions registry/service_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4078e2

Please sign in to comment.