mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-24 10:07:04 +02:00
return error when zero services in mock registry
This commit is contained in:
parent
0190b1ab3a
commit
6aac602b31
@ -60,7 +60,7 @@ func (m *mockRegistry) init() {
|
||||
|
||||
func (m *mockRegistry) GetService(service string) ([]*registry.Service, error) {
|
||||
s, ok := m.Services[service]
|
||||
if !ok {
|
||||
if !ok || len(s) == 0 {
|
||||
return nil, registry.ErrNotFound
|
||||
}
|
||||
return s, nil
|
||||
|
Loading…
Reference in New Issue
Block a user