1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-11-06 08:59:18 +02:00

fix: k8s nacos and zookeeper registry lint (#1599)

This commit is contained in:
wangcong
2021-11-04 22:06:14 +08:00
committed by GitHub
parent f42b1c4dd2
commit cf385f6285
10 changed files with 58 additions and 63 deletions

View File

@@ -6,9 +6,7 @@ import (
"github.com/go-kratos/kratos/v2/registry"
)
var (
_ registry.Watcher = &watcher{}
)
var _ registry.Watcher = &watcher{}
type watcher struct {
ctx context.Context
@@ -25,9 +23,7 @@ func (w watcher) Next() (services []*registry.ServiceInstance, err error) {
}
ss, ok := w.set.services.Load().([]*registry.ServiceInstance)
if ok {
for _, s := range ss {
services = append(services, s)
}
services = append(services, ss...)
}
return
}