v3 refactor (#1868)

* Move to v3

Co-authored-by: Ben Toogood <bentoogood@gmail.com>
This commit is contained in:
Asim Aslam
2020-07-27 13:22:00 +01:00
committed by GitHub
parent 9dfeb98111
commit 563768b58a
424 changed files with 6383 additions and 22490 deletions

View File

@@ -2,8 +2,9 @@
package registry
import (
"github.com/micro/go-micro/v2/network/resolver"
"github.com/micro/go-micro/v2/registry"
"github.com/micro/go-micro/v3/network/resolver"
"github.com/micro/go-micro/v3/registry"
"github.com/micro/go-micro/v3/registry/mdns"
)
// Resolver is a registry network resolver
@@ -16,7 +17,7 @@ type Resolver struct {
func (r *Resolver) Resolve(name string) ([]*resolver.Record, error) {
reg := r.Registry
if reg == nil {
reg = registry.DefaultRegistry
reg = mdns.NewRegistry()
}
services, err := reg.GetService(name)