Remove use of config/cmd in api
This commit is contained in:
		| @@ -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 { | ||||
|   | ||||
| @@ -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 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user