Don't add to defaults in func init, just add them to cmd

This commit is contained in:
Asim
2016-04-26 18:49:02 +01:00
parent f7c57fd4f4
commit 3d3044404e
7 changed files with 26 additions and 35 deletions

View File

@@ -3,7 +3,6 @@ package roundrobin
import (
"sync"
"github.com/micro/go-micro/cmd"
"github.com/micro/go-micro/registry"
"github.com/micro/go-micro/selector"
)
@@ -12,10 +11,6 @@ type roundRobinSelector struct {
so selector.Options
}
func init() {
cmd.DefaultSelectors["roundrobin"] = NewSelector
}
func (r *roundRobinSelector) Init(opts ...selector.Option) error {
for _, o := range opts {
o(&r.so)