move addr extractor to misc

This commit is contained in:
Asim Aslam
2017-01-12 13:20:34 +00:00
parent fd78e1d432
commit a9889730d6
6 changed files with 6 additions and 195 deletions

View File

@@ -20,6 +20,7 @@ import (
"github.com/micro/go-micro/broker/codec/json"
"github.com/micro/go-micro/errors"
"github.com/micro/go-micro/registry"
"github.com/micro/misc/lib/addr"
mls "github.com/micro/misc/lib/tls"
"github.com/pborman/uuid"
@@ -411,7 +412,7 @@ func (h *httpBroker) Subscribe(topic string, handler Handler, opts ...SubscribeO
host := strings.Join(parts[:len(parts)-1], ":")
port, _ := strconv.Atoi(parts[len(parts)-1])
addr, err := extractAddress(host)
addr, err := addr.Extract(host)
if err != nil {
return nil, err
}