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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user