Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wenxuwan committed Mar 4, 2021
1 parent 786e843 commit 9d8c910
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/coreos/etcd v3.3.25+incompatible
github.com/creasty/defaults v1.5.1
github.com/dubbogo/go-zookeeper v1.0.3
github.com/dubbogo/gost v1.11.0
github.com/dubbogo/gost v1.11.2
github.com/emicklei/go-restful/v3 v3.4.0
github.com/fsnotify/fsnotify v1.4.9
github.com/go-co-op/gocron v0.1.1
Expand Down Expand Up @@ -47,7 +47,6 @@ require (

replace (
github.com/coreos/bbolt => go.etcd.io/bbolt v1.3.4
github.com/dubbogo/gost => github.com/wenxuwan/gost v1.9.4-0.20210303060806-fde1b7159726
github.com/envoyproxy/go-control-plane => github.com/envoyproxy/go-control-plane v0.8.0
github.com/shirou/gopsutil => github.com/shirou/gopsutil v0.0.0-20181107111621-48177ef5f880
go.etcd.io/bbolt v1.3.4 => github.com/coreos/bbolt v1.3.3
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ github.com/dubbogo/gost v1.9.0/go.mod h1:pPTjVyoJan3aPxBPNUX0ADkXjPibLo+/Ib0/fAD
github.com/dubbogo/gost v1.10.1/go.mod h1:+mQGS51XQEUWZP2JeGZTxJwipjRKtJO7Tr+FOg+72rI=
github.com/dubbogo/gost v1.11.0 h1:9KtyWQz1gMlAfwzen5iyhMdoe08SPBBUVhco4rdgJ9I=
github.com/dubbogo/gost v1.11.0/go.mod h1:w8Yw29eDWtRVo3tx9nPpHkNZnOi4SRx1fZf7eVlAAU4=
github.com/dubbogo/gost v1.11.2 h1:NanyHmvzE1HrgI2T9H/jE/N1wkxFEj+IbM1A4RT9H7Q=
github.com/dubbogo/gost v1.11.2/go.mod h1:3QQEj50QOhkWTERT785YZ5ZxIRGNdR11FCLP7FzHsMc=
github.com/dubbogo/jsonparser v1.0.1/go.mod h1:tYAtpctvSP/tWw4MeelsowSPgXQRVHHWbqL6ynps8jU=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
Expand Down
1 change: 1 addition & 0 deletions metadata/report/zookeeper/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
import (
gxzookeeper "github.com/dubbogo/gost/database/kv/zk"
)

import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/constant"
Expand Down
10 changes: 4 additions & 6 deletions registry/zookeeper/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (r *zkRegistry) InitListeners() {
defer oldDataListener.mutex.Unlock()
r.dataListener.closed = true
recovered := r.dataListener.subscribed
if recovered != nil && len(recovered) > 0 {
if len(recovered) > 0 {
// recover all subscribed url
for _, oldListener := range recovered {
var (
Expand Down Expand Up @@ -295,11 +295,9 @@ func (r *zkRegistry) getCloseListener(conf *common.URL) (*RegistryConfigurationL
configurationListener := r.dataListener.subscribed[conf.ServiceKey()]
if configurationListener != nil {
zkListener, _ = configurationListener.(*RegistryConfigurationListener)
if zkListener != nil {
if zkListener.isClosed {
r.dataListener.mutex.Unlock()
return nil, perrors.New("configListener already been closed")
}
if zkListener != nil && zkListener.isClosed {
r.dataListener.mutex.Unlock()
return nil, perrors.New("configListener already been closed")
}
}

Expand Down
3 changes: 2 additions & 1 deletion registry/zookeeper/service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ package zookeeper

import (
"fmt"
gxzookeeper "github.com/dubbogo/gost/database/kv/zk"
"net/url"
"strconv"
"strings"
"sync"
)

import (
gxset "github.com/dubbogo/gost/container/set"
gxzookeeper "github.com/dubbogo/gost/database/kv/zk"
gxpage "github.com/dubbogo/gost/hash/page"
perrors "github.com/pkg/errors"
)
Expand Down
1 change: 1 addition & 0 deletions remoting/exchange_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
import (
uatomic "go.uber.org/atomic"
)

import (
"github.com/apache/dubbo-go/common"
"github.com/apache/dubbo-go/common/logger"
Expand Down

0 comments on commit 9d8c910

Please sign in to comment.