From 05aee1a3c2dd408dd30e3afbe3700ffe1c9fa001 Mon Sep 17 00:00:00 2001 From: ben-toogood Date: Wed, 1 Jul 2020 17:06:59 +0100 Subject: [PATCH] Deprecate client/selector (#1767) * client/{grpc,rpc}: depricate selector (wip) * {client,cmd}: remove client/selector * deprecate client/selector * router/static: fix lookup * config/cmd: add support for legacy static selector flag * config/cmd: add support for legacy dns selector flag --- static.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static.go b/static.go index e7e6054..299c8f8 100644 --- a/static.go +++ b/static.go @@ -1,6 +1,8 @@ package static -import "github.com/micro/go-micro/v2/router" +import ( + "github.com/micro/go-micro/v2/router" +) // NewRouter returns an initialized static router func NewRouter(opts ...router.Option) router.Router { @@ -39,8 +41,8 @@ func (s *static) Process(*router.Advert) error { return nil } -func (s *static) Lookup(...router.QueryOption) ([]router.Route, error) { - return nil, nil +func (s *static) Lookup(opts ...router.QueryOption) ([]router.Route, error) { + return s.table.Query(opts...) } func (s *static) Watch(opts ...router.WatchOption) (router.Watcher, error) {