1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-11-29 21:47:44 +02:00

fix: some linting issues (#2563)

This commit is contained in:
David Brouwer
2022-09-30 16:27:07 +02:00
committed by GitHub
parent 47e6a8d725
commit 85c0b0b8eb
221 changed files with 1025 additions and 1283 deletions

View File

@@ -8,15 +8,15 @@ import (
var (
DefaultRegistry = NewRegistry()
// Not found error when GetService is called
// Not found error when GetService is called.
ErrNotFound = errors.New("service not found")
// Watcher stopped error when watcher is stopped
// Watcher stopped error when watcher is stopped.
ErrWatcherStopped = errors.New("watcher stopped")
)
// The registry provides an interface for service discovery
// and an abstraction over varying implementations
// {consul, etcd, zookeeper, ...}
// {consul, etcd, zookeeper, ...}.
type Registry interface {
Init(...Option) error
Options() Options
@@ -72,7 +72,7 @@ func Register(s *Service, opts ...RegisterOption) error {
return DefaultRegistry.Register(s, opts...)
}
// Deregister a service node
// Deregister a service node.
func Deregister(s *Service) error {
return DefaultRegistry.Deregister(s)
}
@@ -82,7 +82,7 @@ func GetService(name string) ([]*Service, error) {
return DefaultRegistry.GetService(name)
}
// List the services. Only returns service names
// List the services. Only returns service names.
func ListServices() ([]*Service, error) {
return DefaultRegistry.ListServices()
}