fix errors

This commit is contained in:
Asim Aslam
2019-06-06 17:58:21 +01:00
parent a58bc8e75c
commit 2cc18d6edc
3 changed files with 10 additions and 10 deletions

View File

@@ -13,12 +13,12 @@ func WithBackend(url string) micro.Option {
// not set
if r == nil {
r = DefaultRouter
r = DefaultProxy
o.Server.Init(server.WithRouter(r))
}
// check its a proxy router
if proxyRouter, ok := r.(*Router); ok {
if proxyRouter, ok := r.(*Proxy); ok {
proxyRouter.Backend = url
}
}