From e0078bbcd51e5e15248f68a54ab7bed8522a925e Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Mon, 30 Dec 2019 17:29:20 +0000 Subject: [PATCH] Remove use of config/cmd in api --- api/handler/http/http_test.go | 2 -- api/router/options.go | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/api/handler/http/http_test.go b/api/handler/http/http_test.go index 9812535c..7e737e06 100644 --- a/api/handler/http/http_test.go +++ b/api/handler/http/http_test.go @@ -9,14 +9,12 @@ import ( "github.com/micro/go-micro/api/handler" "github.com/micro/go-micro/api/router" regRouter "github.com/micro/go-micro/api/router/registry" - "github.com/micro/go-micro/config/cmd" "github.com/micro/go-micro/registry" "github.com/micro/go-micro/registry/memory" ) func testHttp(t *testing.T, path, service, ns string) { r := memory.NewRegistry() - cmd.DefaultCmd = cmd.NewCmd(cmd.Registry(&r)) l, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { diff --git a/api/router/options.go b/api/router/options.go index 7285c74d..a48f3e39 100644 --- a/api/router/options.go +++ b/api/router/options.go @@ -3,7 +3,6 @@ package router import ( "github.com/micro/go-micro/api/resolver" "github.com/micro/go-micro/api/resolver/micro" - "github.com/micro/go-micro/config/cmd" "github.com/micro/go-micro/registry" ) @@ -19,7 +18,7 @@ type Option func(o *Options) func NewOptions(opts ...Option) Options { options := Options{ Handler: "meta", - Registry: *cmd.DefaultOptions().Registry, + Registry: registry.DefaultRegistry, } for _, o := range opts {