From c13f8bd021a83ab2f3f79735ff88656a9596d338 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Fri, 10 Apr 2020 17:41:10 +0100 Subject: [PATCH] move reg util to own package (#1523) * move reg util to own package * fix test * fix broken static router --- static.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static.go b/static.go index 09271c7..f868e52 100644 --- a/static.go +++ b/static.go @@ -16,6 +16,7 @@ import ( "github.com/micro/go-micro/v2/logger" "github.com/micro/go-micro/v2/metadata" "github.com/micro/go-micro/v2/registry" + util "github.com/micro/go-micro/v2/util/registry" ) type endpoint struct { @@ -164,7 +165,7 @@ func (r *staticRouter) Endpoint(req *http.Request) (*api.Service, error) { // hack for stream endpoint if ep.apiep.Stream { - svcs := registry.Copy(services) + svcs := util.Copy(services) for _, svc := range svcs { if len(svc.Endpoints) == 0 { e := ®istry.Endpoint{}